Skip to content

Instantly share code, notes, and snippets.

@igrigorik

igrigorik/bq.sql

Last active Jan 17, 2020
Embed
What would you like to do?
/* count of issues opened, closed, and reopened on 2019/01/01 */
SELECT event as issue_status, COUNT(*) as cnt FROM (
SELECT type, repo.name, actor.login,
JSON_EXTRACT(payload, '$.action') as event,
FROM `githubarchive.day.20190101`
WHERE type = 'IssuesEvent'
)
GROUP by issue_status;
@jasonhall-at-google

This comment has been minimized.

Copy link

@jasonhall-at-google jasonhall-at-google commented Jan 13, 2015

It might be useful to fully-specify the table name, e.g., [githubarchive:day.events_]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.