TreeviewCopyright © aleen42 all right reserved, powered by aleen42
183. 从不订购的客户
MySQL
# Write your MySQL query statement below
SELECT Name as Customers
FROM Customers
WHERE Id NOT IN
(
SELECT CustomerId FROM Orders
)
SQLServer
/* Write your T-SQL query statement below */
SELECT Name as Customers
FROM Customers c LEFT JOIN Orders o
ON c.Id = o.CustomerId
WHERE o.Id IS NULL