Skip to content

Instantly share code, notes, and snippets.

@nuria
Created July 22, 2019 20:17
Show Gist options
  • Save nuria/aa8a0c58e7c65772dbc736880551adeb to your computer and use it in GitHub Desktop.
Save nuria/aa8a0c58e7c65772dbc736880551adeb to your computer and use it in GitHub Desktop.
select events per day
select CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) AS date,
count(1) as n_events
from event.externalguidance
where year=2019 and month=6
and not useragent.is_bot
and event.action = 'init'
group by year, month, day
order by date
limit 1000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment