I would like to add columns by following window function.
select goods_code,event_code ,DENSE_RANK() Over (
Order By case when goods_code = "aaaa" then 1 end,
case when event_code = "a" then 1 end)
from atai.pricing_pattern
but it returned following error.
ERROR: column "aaaa" does not exist
LINE 1: ...ENSE_RANK() Over (Order By case when goods_code = "aaaa" the...
^
What is the root cause of this? if someone has opinion,will you please let me know Thanks