a) SELECT maker, speed FROM Product NATURAL JOIN Laptop WHERE hd >= 30; or SELECT maker, speed FROM Product, Laptop WHERE Product.model = Laptop.model AND hd >= 30; b) In standard SQL, one possibility is: SELECT model, price FROM (((SELECT model, price FROM PC) UNION (SELECT model, price FROM Laptop) UNION (SELECT model, price FROM Printer)) NATURAL JOIN Product) WHERE maker = "B"; In mySQL, set operations are not implemented in version 3.23 installed at Daimi (but are in the recent version 4.0). Also, sub-selections are not part of mySQL yet (they are being implemented in the forthcoming version 4.1). One can instead use temporary relations (relations which are removed after the session is over): CREATE TEMPORARY TABLE temp SELECT model, price FROM PC; INSERT INTO temp SELECT model, price FROM Laptop; INSERT INTO temp SELECT model, price FROM Printer; SELECT temp.model, price FROM temp NATURAL JOIN Product WHERE maker = "B"; If you want to use temp for other similar things, clean it up: DROP TABLE temp; Or better, do this as the first line (to ensure empty relation at start). If this is your standard policy, you don't need to clean up after use. c) In mySQL: CREATE TEMPORARY TABLE PCMakers SELECT maker FROM Product WHERE type = "pc"; CREATE TEMPORARY TABLE LaptopMakers SELECT maker FROM Product WHERE type = "laptop"; SELECT DISTINCT LaptopMakers.maker FROM LaptopMakers NATURAL LEFT OUTER JOIN PCMakers WHERE PCMakers.maker IS NULL; The LEFT OUTER JOIN trick is needed because mySQL does not have the boolean function [NOT] IN. The trick is described in section 1.7.4.1 in the mySQL documentation (http://www.mysql.com/doc/en/index.html). d) SELECT DISTINCT pc1.hd FROM PC AS pc1, PC AS pc2 WHERE (pc1.hd = pc2.hd) AND (pc1.model != pc2.model); or (probably better) SELECT hd FROM PC GROUP BY hd HAVING COUNT(*) >= 2; e) SELECT pc1.model, pc2.model FROM PC AS pc1, PC AS pc2 WHERE (pc1.model < pc2.model) AND (pc1.speed = pc2.speed) AND (pc1.ram = pc2.ram); f) In mySQL: CREATE TEMPORARY TABLE temp SELECT model FROM PC WHERE speed >= 1000; INSERT INTO temp SELECT model FROM Laptop WHERE speed >= 1000; SELECT maker FROM Product NATURAL JOIN temp GROUP BY maker HAVING COUNT(*) >= 2; As in the first version of d), we could do the GROUP BY...HAVING part by using joins and conditions in WHERE (if we want to use only SQL described up to Section 6.2). In standard SQL, we could of course pack the entire thing into one big query (with subqueries).