groupby sort sql hive

Solutions on MaxInterview for groupby sort sql hive by the best coders in the world

showing results for - "groupby sort sql hive"
Solomon
10 Mar 2020
1SELECT 
2    place, 
3    cnt, 
4    sum_ 
5FROM (
6    SELECT 
7        place, 
8        count(*) as cnt, 
9        sum(weight) as sum_ 
10    FROM a 
11    GROUP BY place
12) a 
13ORDER BY place;