Question 1
A database has tables: Product(ProductID, ProductName, Price, SupplierID) and Supplier(SupplierID, SupplierName). Write SQL to retrieve the ProductName and SupplierName of all products with a Price greater than 50.00, ordered by Price descending. [4]
1
SELECT Product.ProductName, Supplier.SupplierName — correct columns selected from correct tables
1
FROM Product INNER JOIN Supplier ON Product.SupplierID = Supplier.SupplierID — correct JOIN condition linking the tables on the foreign/primary key
1
WHERE Price > 50.00 — correct filter condition
1
ORDER BY Price DESC — correct ordering with DESC keyword