So I am trying to find those manufacturers that sell Laptops, but not PC’s.
The schemas of the relations provided are: Product (maker, model, type), PC (model, speed, ram, hdisk, price), Laptop (model, speed, ram, hdisk, screen, price), and Printer (model, color, type, price)
I tried:
(SELECT DISTINCT maker
FROM Product P
WHERE P.type=’Laptop’)
EXCEPT
(SELECT DISTINCT maker
FROM Product P
WHERE P.type=’PC’);
But I get the following error:
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXCEPT (SELECT DISTINCT maker FROM Product P WHERE P.type=’PC’)' at line 4
What am I doing wrong here? The EXCEPT in the query is underlined red in MySQL Workbench.