I am having an issue saying that "total amount" is an invalid identifier on my where clause. I want to use the "total amount" and compare it to another number that is determine in the insert code here section but cannot figure out how to properly set up the first part of the where.
When naming a column like I did do you not use the name when wanting to use that column in a where?
SELECT desc, TO_CHAR(SUM(price * quantity), '99999.00') AS "total amount"
FROM items i
JOIN line_items li
ON i.item_id = li.item_id
WHERE "total amount" >
(*insert code here*);