|
Download tasks/readable/042/task_readable.md from megagonlabs/arcs: direct link, hf CLI and curl.
- Browser
- Download file 953 Bytes
-
https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/042/task_readable.md
- Command line
-
hf download hf://datasets/megagonlabs/arcs/tasks/readable/042/task_readable.md
-
curl -L -o task_readable.md https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/042/task_readable.md
953 Bytes
| # Task: 042 | |
| **Database:** github_repos | |
| ## Question | |
| Count the total number of Wiki pages updated in the last month of 2022 and 2023. | |
| ## Gold Query | |
| ```sql | |
| WITH combined_events AS ( | |
| SELECT | |
| json_extract(g.repo, '$.id') AS repo_id, | |
| json_extract(g.payload, '$.pages') AS pages | |
| FROM MONTH_202212 g | |
| WHERE g.type = 'GollumEvent' | |
| UNION ALL | |
| SELECT | |
| json_extract(g.repo, '$.id') AS repo_id, | |
| json_extract(g.payload, '$.pages') AS pages | |
| FROM YEAR_2023 g | |
| WHERE g.type = 'GollumEvent' | |
| ), | |
| updated_pages AS ( | |
| SELECT combined_events.repo_id, json_extract(page.value, '$.page_name') AS page_name | |
| FROM combined_events, | |
| json_each(combined_events.pages) AS page | |
| WHERE json_extract(page.value, '$.action') IN ('created', 'edited') | |
| GROUP BY combined_events.repo_id, page_name | |
| ) | |
| SELECT COUNT(*) AS total_wiki_pages_updated FROM updated_pages; | |
| ``` | |
| **Execution Result:** | |
| | total_wiki_pages_updated | | |
| |----------------------------| | |
| | 19 | | |
| *1 rows* |