Spaces:
Runtime error
Runtime error
File size: 12,394 Bytes
f6f97d8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
Generate SQL given the statement and table to verify the statement correctly. If statement-relevant column(s) contents are not suitable for SQL comparisons or calculations, map it to a new column with clean content by a new grammar QA("map@"). If mapping to a new column still can not answer the statement with valid SQL, turn to an end-to-end solution by a new grammar QA("ans@"). This grammar aims to solve all the rest of complex statements or tables. CREATE TABLE jason chambers( row_id int, res text, record text, opponent text, method text, event text, round text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id res record opponent method event round 0 win 18 - 5 - 2 dan new submission (rear naked choke) tfc - power fights 1 1 win 17 - 5 - 2 rene gonzalez decision (split) mainstream mma - cold war n / a 2 loss 16 - 5 - 2 tristan yunker submission ( armbar ) tfc 7 - total fight challenge 7 1 */ Q: in mac - midwest absolute challenge , the player be defeat by dan spychalski in 1 round NeuralSQL: SELECT (SELECT opponent, round FROM w WHERE event = "mac - midwest absolute challenge")=("dan spychalski", 1) CREATE TABLE 1943 vfl season( row_id int, home team text, home team score text, away team text, away team score text, venue text, crowd int, date text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id home team home team score away team away team score venue crowd date 0 footscray 10.11 (71) south melbourne 6.14 (50) western oval 7500 1943-06-26 00:00:00 1 collingwood 10.21 (81) melbourne 13.9 (87) victoria park 5000 1943-06-26 00:00:00 2 carlton 15.16 (106) fitzroy 9.13 (67) princes park 12000 1943-06-26 00:00:00 */ Q: western oval be the venue when the home team footscray score 10.11 (71) NeuralSQL: SELECT (SELECT venue FROM w WHERE `home team`="footscray" AND `home team score`="10.11 (71)") = "western oval" CREATE TABLE 2005 pba draft( row_id int, pick int, player text, country of origin text, pba team text, college text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id pick player country of origin pba team college 0 1 jay washington united states air21 express eckerd 1 2 alex cabagnot united states sta lucia realtors hawaii - hilo 2 3 dennis miranda philippines coca - cola tigers feu */ Q: leo najorda be from philippine NeuralSQL: SELECT (SELECT `country of origin` FROM w WHERE player = "leo najorda")="philippines" CREATE TABLE none( row_id int, event text, long course / short course text, year set int, time text, meet text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id event long course / short course year set time meet 0 100 m freestyle long course 2007 54.08 2007 fina world aquatic championships 1 200 m individual medley long course 2011 2:11.23 2011 canadian world championship trials 2 4 x 100 m medley relay long course 2010 3:38.14 2010 pan pacific championships */ Q: in 2009 the record be set in 7:51:80 NeuralSQL: SELECT (SELECT time FROM w WHERE `year set` = 2009)="7:51.8" CREATE TABLE turkish cup( row_id int, round text, clubs remaining int, clubs involved int, winners from previous round real, new entries this round real, leagues entering at this round text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id round clubs remaining clubs involved winners from previous round new entries this round leagues entering at this round 0 first round 156 86 nan 86.0 tff third league & turkish regional amateur league 1 second round 113 108 43.0 65.0 süper lig & tff first league & tff second league 2 third round 59 54 54.0 nan none */ Q: during the 3rd round of the turkish cup , there be no new entry during that stage NeuralSQL: SELECT (SELECT `new entries this round` FROM w WHERE round = 'third round') IS NULL CREATE TABLE turkish cup( row_id int, round text, clubs remaining int, clubs involved int, winners from previous round real, new entries this round real, leagues entering at this round text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id round clubs remaining clubs involved winners from previous round new entries this round leagues entering at this round 0 first round 156 86 nan 86.0 tff third league & turkish regional amateur league 1 second round 113 108 43.0 65.0 süper ligs & tff first league & tff second league 2 third round 59 54 54.0 nan none */ Q: süper lig be the most common league to win a round in the turkish cup NeuralSQL: SELECT QA("ans@what is the most common league?"; `leagues entering at this round`) = 'süper ligs' CREATE TABLE turkish cup( row_id int, round text, clubs remaining int, clubs involved int, winners from previous round real, new entries this round real, leagues entering at this round text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id round clubs remaining clubs involved winners from previous round new entries this round leagues entering at this round 0 first round 156 86 nan 86.0 tff third league & turkish regional amateur league 1 second round 113 108 43.0 65.0 süper lig & tff first league & tff second league 2 third round 59 54 54.0 nan none */ Q: the lowest number of new entry conclude a round in the turkish cup be 5 NeuralSQL: SELECT (SELECT MIN(`new entries this round`) FROM w) = 5 CREATE TABLE cultural interest fraternities and sororities( row_id int, letters text, organization text, nickname text, founding time text, founding university text, type text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id letters organization nickname founding time founding university type 0 αεπ alpha epsilon pi 1 aepi 1913-11-07 00:00:00 new york university fraternity 1 αεφ alpha epsilon phi 2 aephi 1909-10-24 00:00:00 barnard college sorority 2 σαεπ sigma alpha epsilon pi 3 sigma 1998-10-01 00:00:00 university of california , davis sorority */ Q: 4 of the cultural interest fraternity and sorority be fraternity while 3 be a sorority NeuralSQL: SELECT (SELECT (SELECT COUNT(*) FROM w WHERE type = 'fraternity') = 4) AND (SELECT (SELECT COUNT(*) FROM w WHERE type = 'sorority') = 3) CREATE TABLE british records in athletics( row_id int, event text, data text, athlete text, date text, place text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id event data athlete date place 0 5 km t19:29 andi drake 1990-05-27 00:00:00 søfteland , norway 1 5 miles 32:38 + ian mccombie 1985-03-23 00:00:00 york , united kingdom 2 10 km 40:17 chris maddocks 1989-04-30 00:00:00 burrator , united kingdom */ Q: there be 8 different event that take place within the united kingdom NeuralSQL: SELECT (SELECT COUNT(place) FROM w WHERE QA("map@is it in united kingdom?"; place) = 'yes') = 8 CREATE TABLE jeev milkha singh( row_id int, tournament text, wins int, top - 10 int, top - 25 int, events int, cuts made int) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id tournament wins top - 10 top - 25 events cuts made 0 masters tournament 0 0 1 3 2 1 us open 0 0 0 4 3 2 the open championship 0 0 0 2 1 */ Q: the number of cut made in the pga championship tournament be smaller than the number of event NeuralSQL: SELECT (SELECT `cuts made` FROM w WHERE tournament = 'pga championship') < (SELECT events FROM w WHERE tournament = 'pga championship') CREATE TABLE 2008 women 's british open( row_id int, place text, player text, country text, score int, to par int) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id place player country score to par 0 1 juli inkster united states 65 7 1 t2 momoko ueda japan 66 6 2 t2 laura diaz united states 66 6 */ Q: the 3 player from japan have the same score NeuralSQL: SELECT (SELECT COUNT(DISTINCT score) FROM w WHERE country = 'japan' GROUP BY score) = 1 CREATE TABLE espn sunday night football results (1987 - 2005)( row_id int, date text, visiting team text, final score text, host team text, stadium text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id date visiting team final score host team stadium 0 september 11 indianapolis colts 24 - 7 baltimore ravens m&t bank stadium 1 september 18 kansas city chiefs 23 - 17 oakland raiders mcafee coliseum 2 september 25 new york giants 23 - 45 san diego chargers qualcomm stadium */ Q: the hosting team be the new york giant on new year even and the st louis ram on new year 's day NeuralSQL: SELECT (SELECT (SELECT `host team` FROM w WHERE QA("map@is it new year even?"; date) = 'yes') = 'new york giant') AND (SELECT (SELECT `host team` FROM w WHERE QA("map@is it new year's day?"; date) = 'yes') = 'st louis ram') CREATE TABLE 2008 women 's british open( row_id int, place text, player text, country text, score text, to par int) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id place player country score to par 0 t1 yuri fudoh japan 66 + 68 = 134 10 1 t1 jiyai shin south korea 66 + 68 = 134 10 2 3 juli inkster united states 65 + 70 = 135 9 */ Q: kristie kerr , tie for 4th place , finish the round 1 stroke under lorena ochoa of mexico NeuralSQL: SELECT (SELECT (SELECT QA("map@what is the derived score?"; score) FROM w WHERE player = 'cristie kerr') < (SELECT QA("map@what is the derived score?"; score) FROM w WHERE player = 'lorena ochoa' AND country = 'mexico')) AND (SELECT (SELECT place FROM w WHERE player = 'cristie kerr') = "t4") CREATE TABLE connecticut public radio( row_id int, call sign text, frequency text, city of license text, facility id int, erp / power w int, height m ( ft ) real, class text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id call sign frequency city of license facility id erp / power w height m ( ft ) class 0 waic 91.9 fm springfield , ma 1749 230 nan b1 1 wedw - fm 88.5 fm stamford , ct 13619 2000 nan a 2 wnpr 90.5 fm ( hd ) connecticut public radio meriden , ct 13627 18500 nan b */ Q: there be 3 station with a call sign number in the 90s NeuralSQL: SELECT (SELECT COUNT(*) FROM w WHERE QA("map@is it in 90s?"; frequency) = 'yes' GROUP BY `call sign`) = 3 CREATE TABLE 2003 chicago white sox season( row_id int, date text, opponent text, score text, loss text, time text, att int, record text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id date opponent score loss time att record 0 august 1 mariners 12 - 1 garcía (9 - 11) 2:52 39337 58 - 51 1 august 2 mariners 0 - 10 wright (0 - 5) 2:22 45719 58 - 52 2 august 3 mariners 2 - 8 buehrle (9 - 11) 2:57 45632 58 - 53 */ Q: the 2003 chicago white sox game play on 26th august be longer than the game play on 24th august NeuralSQL: SELECT (SELECT time FROM w WHERE date = 'august 26') > (SELECT time FROM w WHERE date = 'august 24') CREATE TABLE 1987 masters tournament( row_id int, place text, player text, country text, score text, to par text, money text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id place player country score to par money 0 t1 larry mize united states 70 + 72 + 72 + 71 = 285 -3 playoff 1 t1 bernhard langer spain 73 + 71 + 70 + 71 = 285 -3 playoff 2 t1 greg norman australia 73 + 74 + 66 + 72 = 285 -3 playoff */ Q: bernhard m. langer have more point than roger maltbie during the 1987 master tournament NeuralSQL: SELECT (SELECT QA("map@what is the total score?"; score) FROM w WHERE player = 'bernhard langer') > (SELECT QA("map@what is the total score?"; score) FROM w WHERE player = 'roger maltbie') CREATE TABLE 1987 masters tournament( row_id int, place text, player text, country text, score text, to par text, money text) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id place player country score to par money 0 t1 larry mize united states 70 + 72 + 72 + 71 = 285 -3 playoff 1 t1 seve ballesteros spain 73 + 71 + 70 + 71 = 285 -3 playoff 2 t1 greg norman australia 73 + 74 + 66 + 72 = 285 -3 playoff */ Q: most of the people who play for the 1987 master tournament be spanish NeuralSQL: SELECT (SELECT(SELECT COUNT(*) FROM w WHERE country = 'spain') / (SELECT COUNT(*) FROM w)) > 0.5 CREATE TABLE 1976 world junior figure skating championships( row_id int, rank int, name text, nation text, points real, places int) /* 3 example rows: SELECT * FROM w LIMIT 3; row_id rank name nation points places 0 1 sherri baier / robin cowan canada 128.39 9 1 2 lorene mitchell / donald mitchell united states 124.94 16 2 3 elizabeth cain / peter cain australia 116.67 33 */ Q: 2 of the 7 top - ranked figure skate team be from france NeuralSQL: SELECT (SELECT (SELECT COUNT(*) FROM w) = 7) AND (SELECT (SELECT COUNT(*) FROM w WHERE nation = 'france') = 2) |