SELECT SupplierName
FROM Suppliers
WHERE EXISTS (SELECT ProductName FROM Products
WHERE Products.SupplierID = Suppliers.supplierID AND Price < 20);
I want to convert the existing clause into an IN
clause of the query.
CodePudding user response:
Here you go:
SELECT SupplierName
FROM Suppliers
WHERE Suppliers.SupplierID IN (
SELECT Products.SupplierID
FROM Products
WHERE Price < 20
)