We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0896d30 commit bb27ad1Copy full SHA for bb27ad1
hive-workflow/select_top_n.sql
@@ -0,0 +1,9 @@
1
+CREATE TABLE top_cool AS
2
+SELECT r.business_id, name, SUM(cool) AS coolness, '${date}' as `date`
3
+FROM review r JOIN business b
4
+ON (r.business_id = b.business_id)
5
+WHERE categories LIKE '%Restaurants%'
6
+AND `date` = '${date}'
7
+GROUP BY r.business_id, name
8
+ORDER BY coolness DESC
9
+LIMIT ${n}
0 commit comments