| /* | |
| { | |
| "qid": "030", | |
| "task_type": "ambig", | |
| "has_intended_resolution": true, | |
| "language": "SQLite", | |
| "db": "professional_basketball", | |
| "question": "Compute the total post-season offensive rebounds and games played in their career for each player born in Oklahoma.", | |
| "gold_ambiguity_points": [ | |
| { | |
| "id": "A", | |
| "phrase": "total post-season offensive rebounds and games played", | |
| "type": "finite", | |
| "ambiguity_type": "syntactic_column", | |
| "interpretations": [ | |
| "total post-season offensive rebounds and post-season games played", | |
| "total post-season offensive rebounds and all games played" | |
| ], | |
| "intended_interpretation_idx": 1 | |
| }, | |
| { | |
| "id": "B", | |
| "phrase": "Oklahoma", | |
| "type": "finite", | |
| "ambiguity_type": "semantic_column", | |
| "interpretations": [ | |
| "Oklahoma State", | |
| "Oklahoma City" | |
| ], | |
| "intended_interpretation_idx": 1 | |
| } | |
| ], | |
| "gold_intended_query_id": "GQRY-A.1-B.1", | |
| "extra_info": {} | |
| } | |
| */ | |
| ----- START OF GOLD QUERY `GQRY-A.0-B.0` ----- | |
| /* | |
| { | |
| "id": "GQRY-A.0-B.0", | |
| "parameter_names": [], | |
| "parameter_values": {}, | |
| "other_exec_results": [], | |
| "required_columns": [ | |
| 1, | |
| 2, | |
| 3, | |
| 4 | |
| ], | |
| "required_sorted": false, | |
| "extra_info": { | |
| "ambiguity_resolution": { | |
| "[A] total post-season offensive rebounds and games played": "total post-season offensive rebounds and post-season games played", | |
| "[B] Oklahoma": "Oklahoma State" | |
| } | |
| } | |
| } | |
| */ | |
| SELECT | |
| p.playerID, | |
| p.firstName, | |
| p.lastName, | |
| SUM(pt.PostoRebounds) AS total_post_offensive_rebounds, | |
| COALESCE(SUM(pt.PostGP), 0) AS total_post_games_played | |
| FROM players p | |
| JOIN players_teams pt ON p.playerID = pt.playerID | |
| WHERE p.birthState = 'OK' | |
| GROUP BY p.playerID, p.firstName, p.lastName; | |
| /* EXEC RESULT | |
| playerID firstName lastName total_post_offensive_rebounds total_post_games_played | |
| beaslch01 Charles Beasley 1 23 | |
| boonero01 Ronald Boone 131 84 | |
| bowiean01 Anthony Bowie 7 40 | |
| bradljo01 Joseph Bradley 0 0 | |
| carran01 Antoine Carr 94 107 | |
| ... TRUNCATED ... | |
| udohek01 Ekpedeme Udoh 0 0 | |
| vannbr01 Bryce Vann 0 4 | |
| vaughda02 David Vaughn 0 1 | |
| voskuja01 Robert Voskuhl 9 6 | |
| willish02 Shelden Williams 2 8 | |
| */ | |
| ----- END OF GOLD QUERY ----- | |
| ----- START OF GOLD QUERY `GQRY-A.0-B.1` ----- | |
| /* | |
| { | |
| "id": "GQRY-A.0-B.1", | |
| "parameter_names": [], | |
| "parameter_values": {}, | |
| "other_exec_results": [], | |
| "required_columns": [ | |
| 1, | |
| 2, | |
| 3, | |
| 4 | |
| ], | |
| "required_sorted": false, | |
| "extra_info": { | |
| "ambiguity_resolution": { | |
| "[A] total post-season offensive rebounds and games played": "total post-season offensive rebounds and post-season games played", | |
| "[B] Oklahoma": "Oklahoma City" | |
| } | |
| } | |
| } | |
| */ | |
| SELECT | |
| p.playerID, | |
| p.firstName, | |
| p.lastName, | |
| SUM(pt.PostoRebounds) AS total_post_offensive_rebounds, | |
| COALESCE(SUM(pt.PostGP), 0) AS total_post_games_played | |
| FROM players p | |
| JOIN players_teams pt ON p.playerID = pt.playerID | |
| WHERE p.birthCity = 'Oklahoma City' | |
| GROUP BY p.playerID, p.firstName, p.lastName; | |
| /* EXEC RESULT | |
| playerID firstName lastName total_post_offensive_rebounds total_post_games_played | |
| boonero01 Ronald Boone 131 84 | |
| carran01 Antoine Carr 94 107 | |
| combsle01 Edwin Combs 0 0 | |
| darcehe01 Henry Darcey 0 0 | |
| farmemi01 Don Farmer 0 27 | |
| ... TRUNCATED ... | |
| griffta01 Taylor Griffin 0 0 | |
| jacksda01 Darnell Jackson 0 5 | |
| mooretr01 Tracy Moore 0 0 | |
| ortonda01 Daniel Orton 0 4 | |
| willish02 Shelden Williams 2 8 | |
| */ | |
| ----- END OF GOLD QUERY ----- | |
| ----- START OF GOLD QUERY `GQRY-A.1-B.0` ----- | |
| /* | |
| { | |
| "id": "GQRY-A.1-B.0", | |
| "parameter_names": [], | |
| "parameter_values": {}, | |
| "other_exec_results": [], | |
| "required_columns": [ | |
| 1, | |
| 2, | |
| 3, | |
| 4 | |
| ], | |
| "required_sorted": false, | |
| "extra_info": { | |
| "ambiguity_resolution": { | |
| "[A] total post-season offensive rebounds and games played": "total post-season offensive rebounds and all games played", | |
| "[B] Oklahoma": "Oklahoma State" | |
| } | |
| } | |
| } | |
| */ | |
| SELECT | |
| p.playerID, | |
| p.firstName, | |
| p.lastName, | |
| SUM(pt.PostoRebounds) AS total_post_offensive_rebounds, | |
| SUM(pt.GP) + COALESCE(SUM(pt.PostGP), 0) AS total_games_played | |
| FROM players p | |
| JOIN players_teams pt ON p.playerID = pt.playerID | |
| WHERE p.birthState = 'OK' | |
| GROUP BY p.playerID, p.firstName, p.lastName; | |
| /* EXEC RESULT | |
| playerID firstName lastName total_post_offensive_rebounds total_games_played | |
| beaslch01 Charles Beasley 1 304 | |
| boonero01 Ronald Boone 131 1125 | |
| bowiean01 Anthony Bowie 7 501 | |
| bradljo01 Joseph Bradley 0 80 | |
| carran01 Antoine Carr 94 1094 | |
| ... TRUNCATED ... | |
| udohek01 Ekpedeme Udoh 0 119 | |
| vannbr01 Bryce Vann 0 111 | |
| vaughda02 David Vaughn 0 119 | |
| voskuja01 Robert Voskuhl 9 456 | |
| willish02 Shelden Williams 2 294 | |
| */ | |
| ----- END OF GOLD QUERY ----- | |
| ----- START OF GOLD QUERY `GQRY-A.1-B.1` ----- | |
| /* | |
| { | |
| "id": "GQRY-A.1-B.1", | |
| "parameter_names": [], | |
| "parameter_values": {}, | |
| "other_exec_results": [], | |
| "required_columns": [ | |
| 1, | |
| 2, | |
| 3, | |
| 4 | |
| ], | |
| "required_sorted": false, | |
| "extra_info": { | |
| "ambiguity_resolution": { | |
| "[A] total post-season offensive rebounds and games played": "total post-season offensive rebounds and all games played", | |
| "[B] Oklahoma": "Oklahoma City" | |
| } | |
| } | |
| } | |
| */ | |
| SELECT | |
| p.playerID, | |
| p.firstName, | |
| p.lastName, | |
| SUM(pt.PostoRebounds) AS total_post_offensive_rebounds, | |
| SUM(pt.GP) + COALESCE(SUM(pt.PostGP), 0) AS total_games_played | |
| FROM players p | |
| JOIN players_teams pt ON p.playerID = pt.playerID | |
| WHERE p.birthCity = 'Oklahoma City' | |
| GROUP BY p.playerID, p.firstName, p.lastName; | |
| /* EXEC RESULT | |
| playerID firstName lastName total_post_offensive_rebounds total_games_played | |
| boonero01 Ronald Boone 131 1125 | |
| carran01 Antoine Carr 94 1094 | |
| combsle01 Edwin Combs 0 48 | |
| darcehe01 Henry Darcey 0 12 | |
| farmemi01 Don Farmer 0 517 | |
| ... TRUNCATED ... | |
| griffta01 Taylor Griffin 0 8 | |
| jacksda01 Darnell Jackson 0 143 | |
| mooretr01 Tracy Moore 0 119 | |
| ortonda01 Daniel Orton 0 20 | |
| willish02 Shelden Williams 2 294 | |
| */ | |
| ----- END OF GOLD QUERY ----- |