-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d2f8b7
commit 13d0f81
Showing
4 changed files
with
88 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
configs/public_api/http_endpoints/sql/GET-repos-commits-time_distribution.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
USE gharchive_dev; | ||
|
||
SELECT | ||
DAYOFWEEK(created_at) - 1 AS dayofweek, | ||
HOUR(created_at) AS hour, | ||
COUNT(1) AS pushes | ||
FROM github_events | ||
WHERE | ||
repo_id IN (SELECT repo_id FROM github_repos WHERE repo_name = CONCAT(${owner}, '/', ${repo}) LIMIT 1) | ||
AND type = 'PushEvent' | ||
AND action = '' | ||
AND | ||
CASE | ||
WHEN ${from} = '' THEN created_at >= DATE_SUB(NOW(), INTERVAL 1 YEAR) | ||
ELSE (created_at >= ${from} AND created_at <= ${to}) | ||
END | ||
GROUP BY dayofweek, hour | ||
ORDER BY dayofweek, hour | ||
; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
configs/public_api/http_endpoints/sql/GET-repos-pull_requests-monthly-loc_dump_AxJOjB.sql
This file was deleted.
Oops, something went wrong.