leetcode刷题MySQL题解四

Posted hhh江月

tags:

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

leetcode刷题mysql题解四

题目叙述

某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。

Customers 表:

±—±------+
| Id | Name |
±—±------+
| 1 | Joe |
| 2 | Henry |
| 3 | Sam |
| 4 | Max |
±—±------+
Orders 表:

±—±-----------+
| Id | CustomerId |
±—±-----------+
| 1 | 3 |
| 2 | 1 |
±—±-----------+
例如给定上述表格,你的查询应返回:

±----------+
| Customers |
±----------+
| Henry |
| Max |
±----------+

题目解答

# Write your MySQL query statement below
select Name as Customers from Customers c0 where c0.Id 

以上是关于leetcode刷题MySQL题解四的主要内容,如果未能解决你的问题,请参考以下文章

leetcode刷题MySQL题解二十四

leetcode刷题MySQL题解十四

leetcode刷题MySQL题解十四

leetcode刷题MySQL题解十二

leetcode刷题MySQL题解十三

leetcode刷题MySQL题解十