USE sql_store;
SELECT *
FROM order_items
WHERE order = 6 AND (unit_price * quantity) > 30
Look at the below image.
I tried finding what might have went wrong but I couldn't.
NOTE: I am a beginner and I started learning SQL recently.
order
is a reserved word (as part of the order by
clause). If you want to use it for a column name, you'll have to escape it by using backticks:
SELECT *
FROM order_items
WHERE `order` = 6 AND (unit_price * quantity) > 30
-- Here^-----^