Reputation: 33
I'm trying to output the ones where the Units on Stock is less than the Units on Order. I'm trying to output the name, products on stock.
Here is the SQL statement:
SELECT ProductName, UnitsOnOrder, UnitsInStock
FROM Product
WHERE (SELECT UnitsInStock FROM Product) < (SELECT UnitsOnOrder);
Upvotes: 0
Views: 44
Reputation: 152
If all of the attributes are in the Product table then I think this should work:
SELECT ProductName, UnitsInStock
FROM Product
WHERE UnitsInStock < UnitsOnOrder
Upvotes: 2