I can’t figure out what I am doing wrong with my query here.
SELECT ORDER#, SUM(PAIDEACH * QUANTITY) AS TOTAL
FROM ORDERITEMS
WHERE TOTAL > 39.9
GROUP BY ORDER#
ORDER BY TOTAL DESC;
This is the error I keep getting:
"TOTAL": invalid identifier
Since you want to have a predicate on your aggregate function, you can use a
HAVINGclause