I am working on a query in Snowflake and am wanting to create an alias for a column. I know you can do this in other languages but am not sure if snowflake supports this.
SELECT
SUM(CASE WHEN s.agi BETWEEN (EXTRACT('year', current_timestamp()) || '-06-01') AND (EXTRACT('year', current_timestamp()) || '-08-31')
THEN s.stageqty END) AS 'FA' || (EXTRACT('year', current_timestamp() || 'Total Shipped Qty'
from Test_Data as s
The error I get is “Syntax error: unexpected ”FA”.”
Let me know if there is a way to do this. Thanks in advance!