Hi. Can someone enlighten me on which part that my query is wrong?
Thanks in advance.
USE sql_store;
SELECT order_id = 6,
quantity,
unit_price,
(quantity * unit_price) AS total_price,
FROM order_items,
WHERE total_price > 30
Hi. Can someone enlighten me on which part that my query is wrong?
Thanks in advance.
USE sql_store;
SELECT order_id = 6,
quantity,
unit_price,
(quantity * unit_price) AS total_price,
FROM order_items,
WHERE total_price > 30
Should look more like this if this is standard SQL:
SELECT
quantity,
unit_price,
(quantity * unit_price) AS total_price,
FROM order_items
WHERE total_price > 3
AND order_id = 6
Although technically that depends on what you were trying to do.