arcs-bench / tasks /readable /046 /task_readable.sql
anon
Upload tasks/ folder for end-to-end loader reproducibility
02edc38
/*
{
"qid": "046",
"task_type": "ambig",
"has_intended_resolution": true,
"language": "SQLite",
"db": "github_repos",
"question": "In the January 2023 table, find all repo names that were forked or had issues opened and have public events.",
"gold_ambiguity_points": [
{
"id": "A",
"phrase": "forked or had issues opened and have public events",
"type": "finite",
"ambiguity_type": "syntactic_computation",
"interpretations": [
"(were forked OR had issues opened) AND (have public events in January 2023)",
"(were forked) OR (had issues opened AND have public events in January 2023)"
],
"intended_interpretation_idx": 1
},
{
"id": "B",
"phrase": "issues opened",
"type": "finite",
"ambiguity_type": "semantic_value",
"interpretations": [
"issues created",
"issues created or reopened"
],
"intended_interpretation_idx": 1
},
{
"id": "C",
"phrase": "public events",
"type": "finite",
"ambiguity_type": "semantic_computation",
"interpretations": [
"events with attribute public=1",
"events of type 'PublicEvent'"
],
"intended_interpretation_idx": 0
}
],
"gold_intended_query_id": "GQRY-A.1-B.1-C.0",
"extra_info": {}
}
*/
----- START OF GOLD QUERY `GQRY-A.0-B.0-C.0` -----
/*
{
"id": "GQRY-A.0-B.0-C.0",
"parameter_names": [],
"parameter_values": {},
"other_exec_results": [],
"required_columns": null,
"required_sorted": false,
"extra_info": {
"ambiguity_resolution": {
"[A] forked or had issues opened and have public events": "(were forked OR had issues opened) AND (have public events in January 2023)",
"[B] issues opened": "issues created",
"[C] public events": "events with attribute public=1"
}
}
}
*/
WITH forked_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'ForkEvent'
),
issues_opened_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'IssuesEvent'
AND json_extract(m.payload, '$.action') = 'opened'
),
public_events_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.public = 1
)
SELECT DISTINCT per.repo_name
FROM public_events_repos per
WHERE per.repo_name IN (
SELECT fr.repo_name FROM forked_repos fr
UNION
SELECT ior.repo_name FROM issues_opened_repos ior
);
/* EXEC RESULT
repo_name
unifyai/ivy
truecharts/charts
sindresorhus/awesome
appsmithorg/appsmith
ksAutotests/TutorialAdminErrors
... TRUNCATED ...
steven-tey/dub
oldschoolgg/oldschoolbot
LaravelDaily/Test-Laravel-Routes
votingworks/vxsuite
themefisher/meghna-hugo
*/
----- END OF GOLD QUERY -----
----- START OF GOLD QUERY `GQRY-A.0-B.0-C.1` -----
/*
{
"id": "GQRY-A.0-B.0-C.1",
"parameter_names": [],
"parameter_values": {},
"other_exec_results": [],
"required_columns": null,
"required_sorted": false,
"extra_info": {
"ambiguity_resolution": {
"[A] forked or had issues opened and have public events": "(were forked OR had issues opened) AND (have public events in January 2023)",
"[B] issues opened": "issues created",
"[C] public events": "events of type 'PublicEvent'"
}
}
}
*/
WITH forked_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'ForkEvent'
),
issues_opened_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'IssuesEvent'
AND json_extract(m.payload, '$.action') = 'opened'
),
public_events_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'PublicEvent'
)
SELECT DISTINCT per.repo_name
FROM public_events_repos per
WHERE per.repo_name IN (
SELECT fr.repo_name FROM forked_repos fr
UNION
SELECT ior.repo_name FROM issues_opened_repos ior
);
/* EXEC RESULT
Empty DataFrame
Columns: [repo_name]
Index: []
*/
----- END OF GOLD QUERY -----
----- START OF GOLD QUERY `GQRY-A.0-B.1-C.0` -----
/*
{
"id": "GQRY-A.0-B.1-C.0",
"parameter_names": [],
"parameter_values": {},
"other_exec_results": [],
"required_columns": null,
"required_sorted": false,
"extra_info": {
"ambiguity_resolution": {
"[A] forked or had issues opened and have public events": "(were forked OR had issues opened) AND (have public events in January 2023)",
"[B] issues opened": "issues created or reopened",
"[C] public events": "events with attribute public=1"
}
}
}
*/
WITH forked_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'ForkEvent'
),
issues_opened_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'IssuesEvent'
AND json_extract(m.payload, '$.action') IN ('opened', 'reopened')
),
public_events_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.public = 1
)
SELECT DISTINCT per.repo_name
FROM public_events_repos per
WHERE per.repo_name IN (
SELECT fr.repo_name FROM forked_repos fr
UNION
SELECT ior.repo_name FROM issues_opened_repos ior
);
/* EXEC RESULT
repo_name
unifyai/ivy
truecharts/charts
sindresorhus/awesome
appsmithorg/appsmith
ksAutotests/TutorialAdminErrors
... TRUNCATED ...
steven-tey/dub
oldschoolgg/oldschoolbot
LaravelDaily/Test-Laravel-Routes
votingworks/vxsuite
themefisher/meghna-hugo
*/
----- END OF GOLD QUERY -----
----- START OF GOLD QUERY `GQRY-A.0-B.1-C.1` -----
/*
{
"id": "GQRY-A.0-B.1-C.1",
"parameter_names": [],
"parameter_values": {},
"other_exec_results": [],
"required_columns": null,
"required_sorted": false,
"extra_info": {
"ambiguity_resolution": {
"[A] forked or had issues opened and have public events": "(were forked OR had issues opened) AND (have public events in January 2023)",
"[B] issues opened": "issues created or reopened",
"[C] public events": "events of type 'PublicEvent'"
}
}
}
*/
WITH forked_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'ForkEvent'
),
issues_opened_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'IssuesEvent'
AND json_extract(m.payload, '$.action') IN ('opened', 'reopened')
),
public_events_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'PublicEvent'
)
SELECT DISTINCT per.repo_name
FROM public_events_repos per
WHERE per.repo_name IN (
SELECT fr.repo_name FROM forked_repos fr
UNION
SELECT ior.repo_name FROM issues_opened_repos ior
);
/* EXEC RESULT
Empty DataFrame
Columns: [repo_name]
Index: []
*/
----- END OF GOLD QUERY -----
----- START OF GOLD QUERY `GQRY-A.1-B.0-C.0` -----
/*
{
"id": "GQRY-A.1-B.0-C.0",
"parameter_names": [],
"parameter_values": {},
"other_exec_results": [],
"required_columns": null,
"required_sorted": false,
"extra_info": {
"ambiguity_resolution": {
"[A] forked or had issues opened and have public events": "(were forked) OR (had issues opened AND have public events in January 2023)",
"[B] issues opened": "issues created",
"[C] public events": "events with attribute public=1"
}
}
}
*/
WITH forked_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'ForkEvent'
),
issues_opened_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'IssuesEvent'
AND json_extract(m.payload, '$.action') = 'opened'
),
public_events_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.public = 1
)
SELECT DISTINCT repo_name
FROM (
SELECT fr.repo_name FROM forked_repos fr
UNION
SELECT ior.repo_name
FROM issues_opened_repos ior
INNER JOIN public_events_repos per ON ior.repo_name = per.repo_name
);
/* EXEC RESULT
repo_name
AirSkyBoat/AirSkyBoat
Automattic/jetpack
CDCgov/prime-reportstream
DantSu/ESCPOS-ThermalPrinter-Android
G-Research/armada
... TRUNCATED ...
truecharts/charts
unifyai/ivy
votingworks/vxsuite
wowsims/wotlk
wxy1343/ManifestAutoUpdate
*/
----- END OF GOLD QUERY -----
----- START OF GOLD QUERY `GQRY-A.1-B.0-C.1` -----
/*
{
"id": "GQRY-A.1-B.0-C.1",
"parameter_names": [],
"parameter_values": {},
"other_exec_results": [],
"required_columns": null,
"required_sorted": false,
"extra_info": {
"ambiguity_resolution": {
"[A] forked or had issues opened and have public events": "(were forked) OR (had issues opened AND have public events in January 2023)",
"[B] issues opened": "issues created",
"[C] public events": "events of type 'PublicEvent'"
}
}
}
*/
WITH forked_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'ForkEvent'
),
issues_opened_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'IssuesEvent'
AND json_extract(m.payload, '$.action') = 'opened'
),
public_events_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'PublicEvent'
)
SELECT DISTINCT repo_name
FROM (
SELECT fr.repo_name FROM forked_repos fr
UNION
SELECT ior.repo_name
FROM issues_opened_repos ior
INNER JOIN public_events_repos per ON ior.repo_name = per.repo_name
);
/* EXEC RESULT
repo_name
Homebrew/homebrew-cask
LAION-AI/Open-Assistant
LaravelDaily/Test-Laravel-Routes
MicrosoftDocs/azure-docs
OneKeyHQ/app-monorepo
... TRUNCATED ...
tgstation/tgstation
themefisher/meghna-hugo
truecharts/charts
unifyai/ivy
wxy1343/ManifestAutoUpdate
*/
----- END OF GOLD QUERY -----
----- START OF GOLD QUERY `GQRY-A.1-B.1-C.0` -----
/*
{
"id": "GQRY-A.1-B.1-C.0",
"parameter_names": [],
"parameter_values": {},
"other_exec_results": [],
"required_columns": null,
"required_sorted": false,
"extra_info": {
"ambiguity_resolution": {
"[A] forked or had issues opened and have public events": "(were forked) OR (had issues opened AND have public events in January 2023)",
"[B] issues opened": "issues created or reopened",
"[C] public events": "events with attribute public=1"
}
}
}
*/
WITH forked_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'ForkEvent'
),
issues_opened_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'IssuesEvent'
AND json_extract(m.payload, '$.action') IN ('opened', 'reopened')
),
public_events_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.public = 1
)
SELECT DISTINCT repo_name
FROM (
SELECT fr.repo_name FROM forked_repos fr
UNION
SELECT ior.repo_name
FROM issues_opened_repos ior
INNER JOIN public_events_repos per ON ior.repo_name = per.repo_name
);
/* EXEC RESULT
repo_name
AirSkyBoat/AirSkyBoat
Automattic/jetpack
CDCgov/prime-reportstream
DantSu/ESCPOS-ThermalPrinter-Android
G-Research/armada
... TRUNCATED ...
truecharts/charts
unifyai/ivy
votingworks/vxsuite
wowsims/wotlk
wxy1343/ManifestAutoUpdate
*/
----- END OF GOLD QUERY -----
----- START OF GOLD QUERY `GQRY-A.1-B.1-C.1` -----
/*
{
"id": "GQRY-A.1-B.1-C.1",
"parameter_names": [],
"parameter_values": {},
"other_exec_results": [],
"required_columns": null,
"required_sorted": false,
"extra_info": {
"ambiguity_resolution": {
"[A] forked or had issues opened and have public events": "(were forked) OR (had issues opened AND have public events in January 2023)",
"[B] issues opened": "issues created or reopened",
"[C] public events": "events of type 'PublicEvent'"
}
}
}
*/
WITH forked_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'ForkEvent'
),
issues_opened_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'IssuesEvent'
AND json_extract(m.payload, '$.action') IN ('opened', 'reopened')
),
public_events_repos AS (
SELECT DISTINCT json_extract(m.repo, '$.name') AS repo_name
FROM MONTH_202301 m
WHERE m.type = 'PublicEvent'
)
SELECT DISTINCT repo_name
FROM (
SELECT fr.repo_name FROM forked_repos fr
UNION
SELECT ior.repo_name
FROM issues_opened_repos ior
INNER JOIN public_events_repos per ON ior.repo_name = per.repo_name
);
/* EXEC RESULT
repo_name
Homebrew/homebrew-cask
LAION-AI/Open-Assistant
LaravelDaily/Test-Laravel-Routes
MicrosoftDocs/azure-docs
OneKeyHQ/app-monorepo
... TRUNCATED ...
tgstation/tgstation
themefisher/meghna-hugo
truecharts/charts
unifyai/ivy
wxy1343/ManifestAutoUpdate
*/
----- END OF GOLD QUERY -----