Skip to content

Instantly share code, notes, and snippets.

@kleong
Created July 30, 2019 20:29
Show Gist options
  • Save kleong/59307cc534e529dcd14845a726751731 to your computer and use it in GitHub Desktop.
Save kleong/59307cc534e529dcd14845a726751731 to your computer and use it in GitHub Desktop.
SELECT t.user.screen_name,
t.user.followers_count AS fc
FROM "twitter-kinesis-demo" t
WHERE 'music' IN
(SELECT hashtags.text
FROM unnest(t.entities.hashtags) hashtags)
GROUP BY (t.user.screen_name,
t.user.followers_count)
ORDER BY t.user.followers_count DESC
LIMIT 5;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment