Skip to content

Instantly share code, notes, and snippets.

@ilyasahsan123
Last active August 22, 2018 10:44
Show Gist options
  • Save ilyasahsan123/3d8ac87acf31ae90ca448092a5c9d832 to your computer and use it in GitHub Desktop.
Save ilyasahsan123/3d8ac87acf31ae90ca448092a5c9d832 to your computer and use it in GitHub Desktop.
select u.display_name
,s.amount
,u.location
from [bigquery-public-data:stackoverflow.users] u
join (
select s.owner_user_id,
count(*) amount
from [bigquery-public-data:stackoverflow.posts_questions] s
group by s.owner_user_id
) s
on s.owner_user_id = u.id
where REGEXP_MATCH(u.location, '(?i)indonesia')
order by s.amount desc
limit 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment