leetcodeSQL相关的题目

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了leetcodeSQL相关的题目相关的知识,希望对你有一定的参考价值。

最近在学mysql,慢慢更新吧

 

推荐好书:SQL必知必会。靠这本书入了个门

 

以下均为MYSQL方式提交

 

Duplicate Emails

select Email from Person 
group by email
having count(*) >1

 

Employees Earning More Than Their Managers

select E1.name as Employee
from Employee as E1,Employee as E2
where E1.ManagerID=E2.Id and E1.Salary>E2.Salary

 

Combine Two Tables

select FirstName,LastName,City,State from Person
left join Address on Person.PersonId=Address.PersonId;

 

Customers Who Never Order

select name as Customers from Customers C
where C.Id not in (select CustomerID from Orders);

 

以上是关于leetcodeSQL相关的题目的主要内容,如果未能解决你的问题,请参考以下文章

第九次作业

AJAX相关JS代码片段和部分浏览器模型

Jekyll 偏移代码片段高亮的初始行

从零开始配置vim(27)——代码片段

从零开始配置vim(27)——代码片段

从零开始配置vim(27)——代码片段