/* { "qid": "037", "task_type": "ambig", "has_intended_resolution": true, "language": "SQLite", "db": "github_repos", "question": "List all repository names with many issues opened in 2022, provide the corresponding issue count and the license for each repository.", "gold_ambiguity_points": [ { "id": "A", "phrase": "many", "type": "infinite", "ambiguity_type": "semantic_value", "parameter_name": "issue_count_threshold", "parameter_dtype": "int", "parameter_sample_operators": [ ">", ">=" ], "parameter_sample_values": [ 7 ], "intended_parameter_operator": ">", "intended_parameter_value": 7 }, { "id": "B", "phrase": "issues opened", "type": "finite", "ambiguity_type": "semantic_value", "interpretations": [ "issues created", "issues created or reopened" ], "intended_interpretation_idx": 1 } ], "gold_intended_query_id": "GQRY-B.1", "extra_info": {} } */ ----- START OF GOLD QUERY `GQRY-B.0` ----- /* { "id": "GQRY-B.0", "parameter_names": [ "issue_count_threshold" ], "parameter_values": { "issue_count_threshold": 7 }, "other_exec_results": [], "required_columns": null, "required_sorted": false, "extra_info": { "ambiguity_resolution": { "[A] issues opened": "issues created", "[B] many": ":issue_count_threshold" } } } */ WITH issue_counts AS ( SELECT json_extract(repo, '$.name') AS repo_name, COUNT(DISTINCT json_extract(payload, '$.issue.id')) AS issues_opened FROM YEAR_2022 WHERE type = 'IssuesEvent' AND json_extract(payload, '$.action') = 'opened' GROUP BY repo_name HAVING issues_opened > :issue_count_threshold ) SELECT ic.repo_name, ic.issues_opened, gl.license FROM issue_counts ic LEFT JOIN GITHUB_REPOS_LICENSES gl ON ic.repo_name = gl.repo_name ORDER BY ic.issues_opened DESC; /* EXEC RESULT repo_name issues_opened license leo424y/heysiri.ml 340 None flutter/flutter 145 bsd-3-clause MicrosoftDocs/azure-docs 113 None herrphon/upptime 99 None home-assistant/core 97 None ... TRUNCATED ... singularity-data/risingwave 10 None scikit-learn/scikit-learn 9 bsd-3-clause Esri/calcite-components 8 None ToolJet/ToolJet 8 None antvis/X6 8 None */ ----- END OF GOLD QUERY ----- ----- START OF GOLD QUERY `GQRY-B.1` ----- /* { "id": "GQRY-B.1", "parameter_names": [ "issue_count_threshold" ], "parameter_values": { "issue_count_threshold": 7 }, "other_exec_results": [], "required_columns": null, "required_sorted": false, "extra_info": { "ambiguity_resolution": { "[A] issues opened": "issues created or reopened", "[B] many": ":issue_count_threshold" } } } */ WITH issue_counts AS ( SELECT json_extract(repo, '$.name') AS repo_name, COUNT(DISTINCT json_extract(payload, '$.issue.id')) AS issues_opened FROM YEAR_2022 WHERE type = 'IssuesEvent' AND json_extract(payload, '$.action') IN ('opened', 'reopened') GROUP BY repo_name HAVING issues_opened > :issue_count_threshold ) SELECT ic.repo_name, ic.issues_opened, gl.license FROM issue_counts ic LEFT JOIN GITHUB_REPOS_LICENSES gl ON ic.repo_name = gl.repo_name ORDER BY ic.issues_opened DESC; /* EXEC RESULT repo_name issues_opened license leo424y/heysiri.ml 340 None flutter/flutter 149 bsd-3-clause MicrosoftDocs/azure-docs 114 None herrphon/upptime 99 None home-assistant/core 99 None ... TRUNCATED ... scikit-learn/scikit-learn 9 bsd-3-clause tloncorp/landscape-apps 9 None Esri/calcite-components 8 None ToolJet/ToolJet 8 None antvis/X6 8 None */ ----- END OF GOLD QUERY -----