Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix example queries to use absolute BQ table names

  • Loading branch information...
commit fab0823823f966a27b7ec2c1050b6d5903014b1f 1 parent 2e5cbfe
@igrigorik authored
Showing with 7 additions and 7 deletions.
  1. +1 −1  README.md
  2. +6 −6 bigquery/README.md
View
2  README.md
@@ -64,7 +64,7 @@ An example query, for more check the [repository readme](https://github.com/igri
```sql
/* top 100 repos for Ruby by number of pushes */
SELECT repository_name, count(repository_name) as pushes, repository_description, repository_url
-FROM github.events
+FROM [githubarchive:github.timeline]
WHERE type="PushEvent"
AND repository_language="Ruby"
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-04-01 00:00:00')
View
12 bigquery/README.md
@@ -11,20 +11,20 @@ Have a clever query you would like to share? Fork the project, add it to the pro
```sql
/* distribution of different events on GitHub */
SELECT type, count(type) as cnt
-FROM [github.timeline]
+FROM [githubarchive:github.timeline]
GROUP BY type
ORDER BY cnt DESC
/* distribution of different events on GitHub for Ruby */
SELECT type, count(type) as cnt
-FROM [github.timeline]
+FROM [githubarchive:github.timeline]
WHERE repository_language="Ruby"
GROUP BY type
ORDER BY cnt DESC
/* watches for a specific language + date range */
SELECT repository_name, count(repository_name) as watches, repository_description, repository_url
-FROM github.timeline
+FROM [githubarchive:github.timeline]
WHERE type="WatchEvent"
AND repository_language="Ruby"
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-04-01 00:00:00')
@@ -33,7 +33,7 @@ ORDER BY watches DESC
/* top 100 repos for Ruby by number of pushes */
SELECT repository_name, count(repository_name) as pushes, repository_description, repository_url
-FROM github.timeline
+FROM [githubarchive:github.timeline]
WHERE type="PushEvent"
AND repository_language="Ruby"
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-04-01 00:00:00')
@@ -43,7 +43,7 @@ LIMIT 100
/* push events by language */
SELECT repository_language, count(repository_language) as pushes
-FROM github.timeline
+FROM [githubarchive:github.timeline]
WHERE type="PushEvent"
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-04-01 00:00:00')
GROUP BY repository_language
@@ -51,7 +51,7 @@ ORDER BY pushes DESC
/* show recent push events for Go, sorted by time */
SELECT repository_name, repository_watchers, url, PARSE_UTC_USEC(created_at) as date
-FROM github.timeline
+FROM [githubarchive:github.timeline]
WHERE type="PushEvent"
AND repository_language="Go"
AND repository_watchers > 1
Please sign in to comment.
Something went wrong with that request. Please try again.