Skip to content

Commit

Permalink
Deployment from Data App
Browse files Browse the repository at this point in the history
  • Loading branch information
tidb-cloud-data-service[bot] authored Nov 25, 2023
1 parent 94a229a commit f716f5e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SELECT
gr.repo_id,
gr.repo_name,
COUNT(*) AS contributions,
DATE_FORMAT(ge.created_at, '%Y-%m-%d %k:00:00') AS event_period
DATE_FORMAT(ge.created_at, '%Y-%m-%d %k:00:00') AS event_hour
FROM github_events ge
JOIN github_repos gr ON ge.repo_id = gr.repo_id
WHERE
Expand All @@ -21,5 +21,5 @@ WHERE
CASE WHEN ${from} = '' THEN (ge.created_at BETWEEN DATE_SUB(NOW(), INTERVAL 1 YEAR) AND NOW())
ELSE (ge.created_at >= ${from} AND ge.created_at <= ${to})
END
GROUP BY gr.repo_id, event_period
ORDER BY gr.repo_id, event_period DESC
GROUP BY gr.repo_id, event_hour
ORDER BY gr.repo_id, event_hour DESC

0 comments on commit f716f5e

Please sign in to comment.