|
Download tasks/readable/045/task_readable.md from megagonlabs/arcs: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/045/task_readable.md
- Command line
-
hf download hf://datasets/megagonlabs/arcs/tasks/readable/045/task_readable.md
-
curl -L -o task_readable.md https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/045/task_readable.md
1.15 kB
Task: 045
Database: github_repos
Question
What is the highest number of issues opened by a single repository (identified by repo ID) in Q3? Use the YEAR_* tables.
Gold Query
WITH issue_counts_2022 AS (
SELECT json_extract(repo, '$.id') AS repo_id,
COUNT(DISTINCT json_extract(payload, '$.issue.id')) AS issues_opened
FROM YEAR_2022
WHERE type = 'IssuesEvent'
AND json_extract(payload, '$.action') = 'opened'
AND strftime('%m', created_at / 1000000, 'unixepoch') IN ('07', '08', '09')
GROUP BY repo_id
),
issue_counts_2023 AS (
SELECT json_extract(repo, '$.id') AS repo_id,
COUNT(DISTINCT json_extract(payload, '$.issue.id')) AS issues_opened
FROM YEAR_2023
WHERE type = 'IssuesEvent'
AND json_extract(payload, '$.action') = 'opened'
AND strftime('%m', created_at / 1000000, 'unixepoch') IN ('07', '08', '09')
GROUP BY repo_id
),
max_counts AS (
SELECT MAX(issues_opened) AS max_value FROM issue_counts_2022
UNION ALL
SELECT MAX(issues_opened) AS max_value FROM issue_counts_2023
)
SELECT MAX(max_value) AS overall_max
FROM max_counts;
Execution Result:
| overall_max |
|---|
| 67 |
1 rows