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
Post a Comment