![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode_db
yubo_725
大前端攻城狮
展开
-
Combine Two Tables
Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | PersonId | int | | FirstName | varchar | | LastName | varchar | +-------------+---------+ Per原创 2015-03-27 14:14:48 · 635 阅读 · 0 评论 -
Customers Who Never Order
Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL query to find all customers who never order anything. Table: Customers. +----+-------+ | Id | Na原创 2015-03-27 11:42:20 · 534 阅读 · 0 评论 -
Second Highest Salary
Write a SQL query to get the second highest salary from the Employee table. +----+--------+ | Id | Salary | +----+--------+ | 1 | 100 | | 2 | 200 | | 3 | 300 | +----+--------+ For exa原创 2015-03-27 12:53:12 · 413 阅读 · 0 评论 -
Duplicate Emails
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Email | +----+---------+ | 1 | a@b.com | | 2 | c@d.com | | 3 | a@b.com | +----+---------+ For原创 2015-03-27 12:22:16 · 471 阅读 · 0 评论 -
Employees Earning More Than Their Managers
The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id. +----+-------+--------+-----------+ | Id | Name | Salary |原创 2015-03-27 12:30:55 · 480 阅读 · 0 评论