Skip to content

Instantly share code, notes, and snippets.

@traviskaufman
Created June 16, 2018 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save traviskaufman/e6f96f778eaa893dd16c5da5fd433d61 to your computer and use it in GitHub Desktop.
Save traviskaufman/e6f96f778eaa893dd16c5da5fd433d61 to your computer and use it in GitHub Desktop.
%%bq --name hn_daily_comment_counts
SELECT
TIMESTAMP_TRUNC(time_ts, DAY) as day,
COUNT(0) as comment_count
FROM
`bigquery-public-data.hacker_news.comments`
GROUP BY
day
ORDER BY
day ASC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment