Suppose that a website contains the tables, the Customers table and the Orders table. Write a SQL query to find all customers The WHO never order anything. Table:customers. +----+-------+ | Id | Name | +----+-------+ | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | +----+-------+ table:orders. +----+------------+ | Id | CustomerId | +----+------------+ | 1 | 3 | | 2 | 1 | +----+------------+ Using The above tables as example, return the following: +-----------+ | Customers | +-----------+ | Henry | | Max | +-----------+ perform left outer JOIN, then Judge CustomerID is NULL record select Name,customerid from Customers C ieft outer join Orders O on C . Id=o.customerid +-------+------------+ | name | CustomerID | +-------+------------+ | Joe | 1 | | Henry | NULL | | Sam | 3 | | Max | NULL | +-------+------------+ select name as CustomersFrom (select Name,customerid to Customers C left outer join Orders O to C.id=o.customerid) t where T.customerid is null;
Customers who never Order