|
Download tasks/readable/048/task_readable.md from megagonlabs/arcs: direct link, hf CLI and curl.
- Browser
- Download file 886 Bytes
-
https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/048/task_readable.md
- Command line
-
hf download hf://datasets/megagonlabs/arcs/tasks/readable/048/task_readable.md
-
curl -L -o task_readable.md https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/048/task_readable.md
886 Bytes
Task: 048
Database: github_repos
Question
Count the number of repository IDs in YEAR_2023 that have public events and also received a large number of pull requests.
Gold Query
WITH repo_public_events AS (
SELECT DISTINCT json_extract(repo, '$.id') as repo_id
FROM YEAR_2023
WHERE type = 'PublicEvent'
),
repo_pull_requests AS (
SELECT
json_extract(repo, '$.id') as repo_id,
COUNT(DISTINCT json_extract(payload, '$.pull_request.id')) as pull_request_count
FROM YEAR_2023
WHERE type = 'PullRequestEvent'
AND json_extract(payload, '$.action') = 'closed'
AND json_extract(payload, '$.pull_request.merged') = true
GROUP BY repo_id
HAVING pull_request_count > :pr_count_threshold
)
SELECT COUNT(*)
FROM repo_public_events rpe
JOIN repo_pull_requests rpr ON rpe.repo_id = rpr.repo_id;
Execution Result:
| COUNT(*) |
|---|
| 0 |
1 rows