https://github.com/leereilly/wee-queries
Query sets for Google Cloud Platform's BigQuery :mag:
https://github.com/leereilly/wee-queries
bigquery
Last synced: 10 months ago
JSON representation
Query sets for Google Cloud Platform's BigQuery :mag:
- Host: GitHub
- URL: https://github.com/leereilly/wee-queries
- Owner: leereilly
- Created: 2016-10-31T06:17:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-07T04:29:32.000Z (over 9 years ago)
- Last Synced: 2025-06-02T08:44:00.790Z (about 1 year ago)
- Topics: bigquery
- Size: 1000 Bytes
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wee Queries
Query sets for [BigQuery](https://bigquery.cloud.google.com/dataset/bigquery-public-data:github_repos) :mag:
## Example
Word on the street was that https://github.com/leereilly/games was on the front page of Hacker News, Reddit, and GitHub's explore page on Oct 24th...
### Query
```sql
SELECT repo.id AS ID, repo.name AS Name, COUNT(*) as Stars
FROM TABLE_DATE_RANGE([githubarchive:day.], TIMESTAMP('2016-10-24'), TIMESTAMP('2016-10-24'))
WHERE type = "WatchEvent"
GROUP BY ID, Name
ORDER BY Stars DESC
LIMIT 5;
```
### Result
| Row | ID | Name | Stars |
|-----|----------|---------------------------------------------------|--------------|
| 1 | 3112748 | leereilly/games :eyes: | 1383 :trophy:|
| 2 | 71732460 | engineerapart/TheRemoteFreelancer | 1009 |
| 3 | 70905478 | songrotek/Deep-Learning-Papers-Reading-Roadmap | 726 |
| 4 | 28457823 | FreeCodeCamp/FreeCodeCamp | 517 |
| 5 | 14807173 | SamyPesse/How-to-Make-a-Computer-Operating-System | 385 |