hadoop - Conditional GROUP BY clause in Hive QL -


I am trying to parameter the group by clause in a hive QL script.

  SELECT COUNT (*) AS sales, country, state, city testdb.data WHERE PRICE & gt; 5 If the group (true, (country, state, city), (country, state))  

how can such a query be obtained?

I have tried to use the CASE statement in GROUP BY and its functions Want to verify. If you can write your position in a case statement then this query can work.

  SELECT * to testdb.data WHERE value & gt; 5 group from the country, the case of the state & lt; Cond & gt; WHEN & lt; Val & gt; Then City END;  

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -