Skip to content
Advertisement

How to use an alias in Hive?

I am trying to find unique cities using the window function, I am not able to use an alias in this query

Advertisement

Answer

You cannot have a window function in the where clause. Put it in a subquery and do the filter afterwards:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement