https://leetcode.cn/problems/customers-who-never-order/description/
五一节后,写道简单水题爽一爽。
SQL
# Write your MySQL query statement below
SELECT A.name AS 'Customers'
FROM Customers AS A
LEFT JOIN Orders AS B
ON A.id = B.customerId
WHERE B.customerId is NULL一开始想用NOT EXISTS去做,但想了想开销应该要比联结大一些,而且还麻烦。