I'm still new to SQL, so I apologize that this is probably a dumb question, This basic bit of code is causing an invalid identifier error
SELECT price * qty_on_hand AS dollar_value
FROM products
WHERE dollar_value >= 20000
ORDER BY dollar_value DESC;
I am trying to select the multiplication of two columns, where there value of greater than or equal to 20,000 and then sort them in descending order. the error message is
Error at Command Line : 3 Column : 7
Error report -
SQL Error: ORA-00904: "DOLLAR_VALUE": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
What is wrong with my SQL? How do i fix this?