2
I have the following query:
Select price, col2, col3*7.5 AS desconto, (price*desconto) AS finalprice
From tab1.
When I run I get the following message: Column 'desconto' cannot be resolved
.
How to resolve this error?
Note: I’m running on AWS Athena following the same SQL standard.
Have you considered using a CTE ( http://www.macoratti.net/13/05/sql_cte1.htm ) to handle the columns before using?
– SylvioT
What the
SGBD
used?– Sorack
Has any response helped solve the problem and can address similar questions from other users? If so, make sure to mark the answer as accepted. To do this just click on the left side of it (below the indicator of up and down votes).
– Sorack