Attached above is the question I am trying to solve. As a start, I wanted to try using the EXCEPT clause in SQL, and get all the values that are not present in the Orders table. This is what I am trying: (Ignore the column names and stuff for now, I just want to test the EXCEPT logic)
SELECT Id, Name FROM Customers
EXCEPT
SELECT O.CustomerId as Id, C.Name AS Name FROM Customers C , Orders O
WHERE C.Id = O.CustomerId
However, I get this error on LeetCode which I am not sure about:
Line 3: SyntaxError: near 'SELECT O.CustomerID as Id, C.Name AS Name FROM Customers C , Orders O WHERE C.Id'
The expected output I want out of the query I wrote is:
Id Name
2 Henry
4 Max
EDIT: This is a problem on LeetCode, and after looking which version it uses I found it is mysql-server 5.7.21