TreeviewCopyright © aleen42 all right reserved, powered by aleen42

183. 从不订购的客户

https://leetcode-cn.com/problems/customers-who-never-order/

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
Copyright © GoogTech 2021 all right reserved,powered by GitbookLast update time : 2021-09-15 01:55:05

results matching ""

    No results matching ""