Skip to content
This repository
Browse code

fix example queries to use absolute BQ table names

  • Loading branch information...
commit fab0823823f966a27b7ec2c1050b6d5903014b1f 1 parent 2e5cbfe
Ilya Grigorik authored

Showing 2 changed files with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. +1 1  README.md
  2. +6 6 bigquery/README.md
2  README.md
Source Rendered
@@ -64,7 +64,7 @@ An example query, for more check the [repository readme](https://github.com/igri
64 64 ```sql
65 65 /* top 100 repos for Ruby by number of pushes */
66 66 SELECT repository_name, count(repository_name) as pushes, repository_description, repository_url
67   -FROM github.events
  67 +FROM [githubarchive:github.timeline]
68 68 WHERE type="PushEvent"
69 69 AND repository_language="Ruby"
70 70 AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-04-01 00:00:00')
12 bigquery/README.md
Source Rendered
@@ -11,20 +11,20 @@ Have a clever query you would like to share? Fork the project, add it to the pro
11 11 ```sql
12 12 /* distribution of different events on GitHub */
13 13 SELECT type, count(type) as cnt
14   -FROM [github.timeline]
  14 +FROM [githubarchive:github.timeline]
15 15 GROUP BY type
16 16 ORDER BY cnt DESC
17 17
18 18 /* distribution of different events on GitHub for Ruby */
19 19 SELECT type, count(type) as cnt
20   -FROM [github.timeline]
  20 +FROM [githubarchive:github.timeline]
21 21 WHERE repository_language="Ruby"
22 22 GROUP BY type
23 23 ORDER BY cnt DESC
24 24
25 25 /* watches for a specific language + date range */
26 26 SELECT repository_name, count(repository_name) as watches, repository_description, repository_url
27   -FROM github.timeline
  27 +FROM [githubarchive:github.timeline]
28 28 WHERE type="WatchEvent"
29 29 AND repository_language="Ruby"
30 30 AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-04-01 00:00:00')
@@ -33,7 +33,7 @@ ORDER BY watches DESC
33 33
34 34 /* top 100 repos for Ruby by number of pushes */
35 35 SELECT repository_name, count(repository_name) as pushes, repository_description, repository_url
36   -FROM github.timeline
  36 +FROM [githubarchive:github.timeline]
37 37 WHERE type="PushEvent"
38 38 AND repository_language="Ruby"
39 39 AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-04-01 00:00:00')
@@ -43,7 +43,7 @@ LIMIT 100
43 43
44 44 /* push events by language */
45 45 SELECT repository_language, count(repository_language) as pushes
46   -FROM github.timeline
  46 +FROM [githubarchive:github.timeline]
47 47 WHERE type="PushEvent"
48 48 AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-04-01 00:00:00')
49 49 GROUP BY repository_language
@@ -51,7 +51,7 @@ ORDER BY pushes DESC
51 51
52 52 /* show recent push events for Go, sorted by time */
53 53 SELECT repository_name, repository_watchers, url, PARSE_UTC_USEC(created_at) as date
54   -FROM github.timeline
  54 +FROM [githubarchive:github.timeline]
55 55 WHERE type="PushEvent"
56 56 AND repository_language="Go"
57 57 AND repository_watchers > 1

0 comments on commit fab0823

Please sign in to comment.
Something went wrong with that request. Please try again.