-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadable_wrong_inference.json
2613 lines (2613 loc) · 165 KB
/
readable_wrong_inference.json
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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[
{
"index": 5,
"hardness": "medium",
"pred": "SELECT Avg(singer.Age), Min(singer.Age), Max(singer.Age) FROM singer WHERE singer.Age = \" m \"",
"gold": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'",
"db_id": "concert_singer",
"question": "What is the average, minimum, and maximum age for all French singers?",
"reason": "WHERE condition error, no-link between France and French"
},
{
"index": 16,
"hardness": "medium",
"pred": "SELECT Max(stadium.Capacity), Avg(stadium.Average) FROM stadium",
"gold": "select max(capacity), average from stadium",
"db_id": "concert_singer",
"question": "What is the maximum capacity and the average of all stadiums ?",
"reason": "misunderstand the 'average' in question and 'average' in column"
},
{
"index": 17,
"hardness": "medium",
"pred": "SELECT Avg(stadium.Average), Max(stadium.Capacity) FROM stadium",
"gold": "select avg(capacity) , max(capacity) from stadium",
"db_id": "concert_singer",
"question": "What is the average and maximum capacities for all stadiums ?",
"reason": "misunderstand the 'average' in question and 'average' in column"
},
{
"index": 18,
"hardness": "medium",
"pred": "SELECT stadium.Name, stadium.Capacity FROM stadium GROUP BY stadium.Highest ORDER BY Avg(stadium.Average) Desc LIMIT 1",
"gold": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1",
"db_id": "concert_singer",
"question": "What is the name and capacity for the stadium with highest average attendance?",
"reason": "misunderstand the 'highest' in question and 'highest' in column"
},
{
"index": 19,
"hardness": "medium",
"pred": "SELECT stadium.Name, stadium.Capacity FROM stadium GROUP BY stadium.Highest ORDER BY Avg(stadium.Average) Desc LIMIT 1",
"gold": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1",
"db_id": "concert_singer",
"question": "What is the name and capacity for the stadium with the highest average attendance?",
"reason": "misunderstand the 'highest' in question and 'highest' in column"
},
{
"index": 23,
"hardness": "medium",
"pred": "SELECT concert.Stadium_ID, Count(*) FROM concert GROUP BY concert.Stadium_ID",
"gold": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id",
"db_id": "concert_singer",
"question": "For each stadium, how many concerts play there?",
"reason": "a little slack off"
},
{
"index": 36,
"hardness": "medium",
"pred": "SELECT singer.Name, Count(*) FROM singer_in_concert JOIN singer ON singer_in_concert.Singer_ID = singer.Singer_ID GROUP BY singer.Name",
"gold": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id",
"db_id": "concert_singer",
"question": "What are the names of the singers and number of concerts for each person?",
"reason": "GROUP BY condition"
},
{
"index": 43,
"hardness": "hard",
"pred": "SELECT Count(*) FROM stadium ORDER BY stadium.Capacity Desc LIMIT 1",
"gold": "select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)",
"db_id": "concert_singer",
"question": "Find the number of concerts happened in the stadium with the highest capacity .",
"reason": "slack off"
},
{
"index": 44,
"hardness": "hard",
"pred": "SELECT Count(*) FROM stadium JOIN concert ON stadium.Stadium_ID = concert.Stadium_ID ORDER BY stadium.Capacity Desc LIMIT 1",
"gold": "select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)",
"db_id": "concert_singer",
"question": "What are the number of concerts that occurred in the stadium with the largest capacity ?",
"reason": "slack off"
},
{
"index": 47,
"hardness": "medium",
"pred": "SELECT Pets.weight FROM Pets WHERE Pets.PetType = (SELECT Min(Pets.PetType) FROM Pets)",
"gold": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1",
"db_id": "pets_1",
"question": "Find the weight of the youngest dog.",
"reason": "no link between 'youngest' and 'pet_age', but there is a little wrong in gold"
},
{
"index": 48,
"hardness": "medium",
"pred": "SELECT Min(Pets.weight) FROM Pets",
"gold": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1",
"db_id": "pets_1",
"question": "How much does the youngest dog weigh?",
"reason": "no link between 'youngest' and 'pet_age'"
},
{
"index": 50,
"hardness": "medium",
"pred": "SELECT Max(Pets.weight), Max(Pets.weight), Pets.PetType FROM Pets GROUP BY Pets.PetType",
"gold": "SELECT max(weight) , petType FROM pets GROUP BY petType",
"db_id": "pets_1",
"question": "List the maximum weight and type for each type of pet.",
"reason": "duplicated choice"
},
{
"index": 51,
"hardness": "medium",
"pred": "SELECT Count(*) FROM Has_Pet JOIN Student ON Has_Pet.StuID = Student.StuID JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Student.Age > 20",
"gold": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20",
"db_id": "pets_1",
"question": "Find number of pets owned by students who are older than 20.",
"reason": "both right"
},
{
"index": 61,
"hardness": "extra",
"pred": "SELECT Student.Major, Student.Age FROM Student WHERE Student.StuID NOT IN (SELECT Has_Pet.StuID FROM Has_Pet JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = \" cat \")",
"gold": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')",
"db_id": "pets_1",
"question": "Find the major and age of students who do not have a cat pet.",
"reason": "both right"
},
{
"index": 62,
"hardness": "extra",
"pred": "SELECT Student.Major, Student.Age FROM Student WHERE Student.StuID NOT IN (SELECT Has_Pet.StuID FROM Has_Pet JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = \" cat \")",
"gold": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')",
"db_id": "pets_1",
"question": "What major is every student who does not own a cat as a pet, and also how old are they?",
"reason": "both right"
},
{
"index": 63,
"hardness": "hard",
"pred": "SELECT Student.StuID FROM Student EXCEPT SELECT Has_Pet.StuID FROM Has_Pet WHERE Pets.PetType = \" cat \"",
"gold": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'",
"db_id": "pets_1",
"question": "Find the id of students who do not have a cat pet.",
"reason": "both right"
},
{
"index": 64,
"hardness": "hard",
"pred": "SELECT Student.StuID FROM Student EXCEPT SELECT Has_Pet.StuID FROM Has_Pet WHERE Pets.PetType = \" cat \"",
"gold": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'",
"db_id": "pets_1",
"question": "What are the ids of the students who do not own cats as pets?",
"reason": "both right"
},
{
"index": 65,
"hardness": "extra",
"pred": "SELECT Student.Fname, Student.Age FROM Student WHERE Student.StuID IN (SELECT Has_Pet.StuID FROM Has_Pet JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = \" dog \" EXCEPT SELECT Has_Pet.StuID FROM Has_Pet JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = \" cat \")",
"gold": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')",
"db_id": "pets_1",
"question": "Find the first name and age of students who have a dog but do not have a cat as a pet.",
"reason": "both right"
},
{
"index": 66,
"hardness": "extra",
"pred": "SELECT Student.Fname FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = \" dog \" EXCEPT SELECT Student.Fname FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = \" cat \"",
"gold": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')",
"db_id": "pets_1",
"question": "What is the first name of every student who has a dog but does not have a cat?",
"reason": "both right"
},
{
"index": 67,
"hardness": "medium",
"pred": "SELECT Pets.PetType, Pets.weight FROM Pets WHERE Pets.pet_age = (SELECT Min(Pets.pet_age) FROM Pets)",
"gold": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1",
"db_id": "pets_1",
"question": "Find the type and weight of the youngest pet.",
"reason": "both right, but more complicated"
},
{
"index": 72,
"hardness": "medium",
"pred": "SELECT Pets.PetType, Max(Pets.pet_age), Pets.PetType FROM Pets GROUP BY Pets.PetType",
"gold": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype",
"db_id": "pets_1",
"question": "What is the average and maximum age for each pet type?",
"reason": "slack off"
},
{
"index": 75,
"hardness": "medium",
"pred": "SELECT Student.Fname, Student.Age FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID WHERE Has_Pet.StuID IN (SELECT Has_Pet.StuID FROM Has_Pet)",
"gold": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid",
"db_id": "pets_1",
"question": "Find the first name and age of students who have a pet.",
"reason": "both right, but more complicated"
},
{
"index": 79,
"hardness": "medium",
"pred": "SELECT Count(*), Has_Pet.StuID FROM Has_Pet GROUP BY Has_Pet.StuID",
"gold": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid",
"db_id": "pets_1",
"question": "Find the number of pets for each student who has any pet and student id.",
"reason": "both right"
},
{
"index": 80,
"hardness": "medium",
"pred": "SELECT Count(*), Has_Pet.StuID FROM Has_Pet GROUP BY Has_Pet.StuID",
"gold": "select count(*) , t1.stuid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid group by t1.stuid",
"db_id": "pets_1",
"question": "For students who have pets , how many pets does each student have ? list their ids instead of names .",
"reason": "both right"
},
{
"index": 83,
"hardness": "hard",
"pred": "SELECT Student.LName FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID WHERE Student.Age = 3",
"gold": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'",
"db_id": "pets_1",
"question": "Find the last name of the student who has a cat that is age 3.",
"reason": "slack off"
},
{
"index": 84,
"hardness": "hard",
"pred": "SELECT Student.LName FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID WHERE Student.Age = 3 AND Student.Age = \" cat \"",
"gold": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'",
"db_id": "pets_1",
"question": "What is the last name of the student who has a cat that is 3 years old?",
"reason": "WHERE condition error"
},
{
"index": 90,
"hardness": "medium",
"pred": "SELECT continents.Continent, continents.Continent, Count(*) FROM continents JOIN countries ON continents.ContId = countries.Continent GROUP BY continents.Continent",
"gold": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;",
"db_id": "car_1",
"question": "For each continent, list its id, name, and how many countries it has?",
"reason": "both right, but why not use primary key after GROUP BY"
},
{
"index": 93,
"hardness": "medium",
"pred": "SELECT car_makers.Maker, car_makers.FullName, Count(*) FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker GROUP BY car_makers.Id",
"gold": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;",
"db_id": "car_1",
"question": "How many models does each car maker produce? List maker full name, id and the number.",
"reason": "a little slack off, maybe weight of 'maker' is too large?"
},
{
"index": 94,
"hardness": "medium",
"pred": "SELECT car_makers.Maker, car_makers.FullName, Count(*) FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker GROUP BY car_makers.Id",
"gold": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;",
"db_id": "car_1",
"question": "What is the full name of each car maker, along with its id and how many models it produces?",
"reason": "a little slack off, maybe weight of 'maker' is too large?"
},
{
"index": 95,
"hardness": "hard",
"pred": "SELECT model_list.Model FROM model_list JOIN cars_data ON model_list.ModelId = cars_data.Id ORDER BY cars_data.Horsepower Asc LIMIT 1",
"gold": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;",
"db_id": "car_1",
"question": "Which model of the car has the minimum horsepower?",
"reason": "slack off, wrong JOIN"
},
{
"index": 97,
"hardness": "extra",
"pred": "SELECT model_list.Model FROM model_list WHERE cars_data.Weight < (SELECT Avg(cars_data.Weight) FROM cars_data)",
"gold": "SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)",
"db_id": "car_1",
"question": "Find the model of the car whose weight is below the average weight.",
"reason": "slack off, 'select A From B'"
},
{
"index": 98,
"hardness": "extra",
"pred": "SELECT model_list.Model FROM cars_data WHERE cars_data.Weight < (SELECT Avg(cars_data.Weight) FROM cars_data)",
"gold": "SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)",
"db_id": "car_1",
"question": "What is the model for the car with a weight smaller than the average?",
"reason": "slack off, 'select A From B'"
},
{
"index": 99,
"hardness": "extra",
"pred": "SELECT car_makers.Maker FROM car_makers JOIN cars_data ON car_makers.Id = cars_data.Id WHERE cars_data.Year = 1970",
"gold": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';",
"db_id": "car_1",
"question": "Find the name of the makers that produced some cars in the year of 1970?",
"reason": "slack off, wrong JOIN"
},
{
"index": 100,
"hardness": "extra",
"pred": "SELECT DISTINCT car_makers.Maker FROM car_makers JOIN cars_data ON car_makers.Id = cars_data.Id WHERE cars_data.Year = 1970",
"gold": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';",
"db_id": "car_1",
"question": "What is the name of the different car makers who produced a car in 1970?",
"reason": "slack off, wrong JOIN"
},
{
"index": 101,
"hardness": "extra",
"pred": "SELECT car_names.Make, car_names.MakeId FROM cars_data JOIN car_names ON car_names.MakeId = cars_data.Id ORDER BY cars_data.Year Asc LIMIT 1",
"gold": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA);",
"db_id": "car_1",
"question": "Find the make and production time of the cars that were produced in the earliest year?",
"reason": "slack off, 'select A From B'"
},
{
"index": 102,
"hardness": "extra",
"pred": "SELECT car_makers.Maker, cars_data.Year FROM car_makers ORDER BY cars_data.Year Asc LIMIT 1",
"gold": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA);",
"db_id": "car_1",
"question": "What is the maker of the carr produced in the earliest year and what year was it?",
"reason": "slack off, 'select A From B'"
},
{
"index": 103,
"hardness": "hard",
"pred": "SELECT DISTINCT model_list.Model FROM model_list WHERE cars_data.Year > 1980",
"gold": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980;",
"db_id": "car_1",
"question": "Which distinct car models are the produced after 1980?",
"reason": "slack off, 'select A From B'"
},
{
"index": 104,
"hardness": "hard",
"pred": "SELECT DISTINCT model_list.Model FROM model_list WHERE model_list.ModelId > 1980",
"gold": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980;",
"db_id": "car_1",
"question": "What are the different models for the cards produced after 1980?",
"reason": "slack off, wrong JOIN"
},
{
"index": 105,
"hardness": "hard",
"pred": "SELECT continents.Continent, Count(*) FROM continents JOIN countries ON continents.ContId = countries.Continent GROUP BY continents.Continent",
"gold": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent;",
"db_id": "car_1",
"question": "How many car makers are there in each continents? List the continent name and the count.",
"reason": "slack off, wrong JOIN"
},
{
"index": 109,
"hardness": "medium",
"pred": "SELECT car_makers.Maker, car_makers.FullName, Count(*) FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker GROUP BY car_makers.Maker",
"gold": "select count(*) , t2.fullname from model_list as t1 join car_makers as t2 on t1.maker = t2.id group by t2.id;",
"db_id": "car_1",
"question": "How many car models are produced by each maker ? Only list the count and the maker full name .",
"reason": "SELECT wrong, GROUP by id is better"
},
{
"index": 111,
"hardness": "medium",
"pred": "SELECT cars_data.Accelerate FROM car_makers JOIN car_names ON car_makers.Id = car_names.MakeId WHERE car_names.Make = \" amc hornet sportabout \" AND car_makers.Maker = \" sw \"",
"gold": "SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';",
"db_id": "car_1",
"question": "What is the accelerate of the car make amc hornet sportabout (sw)?",
"reason": "slack off, 'select A From B'"
},
{
"index": 112,
"hardness": "medium",
"pred": "SELECT cars_data.Accelerate FROM car_makers JOIN car_names ON car_makers.Id = car_names.MakeId WHERE car_names.Make = \" amc hornet sportabout \" AND car_makers.Maker = \" sw \"",
"gold": "SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';",
"db_id": "car_1",
"question": "How much does the car accelerate that makes amc hornet sportabout (sw)?",
"reason": "slack off, 'select A From B'"
},
{
"index": 115,
"hardness": "hard",
"pred": "SELECT Count(*) FROM countries WHERE countries.CountryName = \" usa \"",
"gold": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';",
"db_id": "car_1",
"question": "How many car models are produced in the usa?",
"reason": "slack off"
},
{
"index": 116,
"hardness": "hard",
"pred": "SELECT Count(*) FROM countries WHERE countries.CountryName = \" usa \"",
"gold": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';",
"db_id": "car_1",
"question": "What is the count of the car models produced in the United States?",
"reason": "slack off"
},
{
"index": 122,
"hardness": "medium",
"pred": "SELECT car_makers.Maker, model_list.Model FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker",
"gold": "SELECT Maker , Model FROM MODEL_LIST;",
"db_id": "car_1",
"question": "What are the makers and models?",
"reason": "slack off"
},
{
"index": 123,
"hardness": "medium",
"pred": "SELECT DISTINCT countries.CountryName, countries.CountryId FROM countries JOIN car_makers ON countries.CountryId = car_makers.Country",
"gold": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;",
"db_id": "car_1",
"question": "What are the countries having at least one car maker? List name and id.",
"reason": "both right"
},
{
"index": 128,
"hardness": "medium",
"pred": "SELECT Avg(cars_data.Weight), Avg(cars_data.Weight), cars_data.Year FROM cars_data GROUP BY cars_data.Year",
"gold": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;",
"db_id": "car_1",
"question": "What is the average weight and year for each year?",
"reason": "duplicated select"
},
{
"index": 129,
"hardness": "extra",
"pred": "SELECT countries.CountryName FROM countries JOIN car_makers WHERE continents.Continent = \" europe \" GROUP BY car_makers.Country HAVING Count(*) >= 3",
"gold": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3;",
"db_id": "car_1",
"question": "Which countries in europe have at least 3 car manufacturers?",
"reason": "JOIN need ON"
},
{
"index": 130,
"hardness": "extra",
"pred": "SELECT countries.CountryName FROM countries JOIN car_makers ON countries.Continent = car_makers.Country WHERE continents.Continent = \" European \" GROUP BY countries.CountryName HAVING Count(*) >= 3",
"gold": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3;",
"db_id": "car_1",
"question": "What are the names of all European countries with at least 3 manufacturers?",
"reason": "slack off, WRONG JOIN, countries.Continent = car_makers.Country"
},
{
"index": 131,
"hardness": "extra",
"pred": "SELECT Max(cars_data.Horsepower), Max(car_names.Make) FROM cars_data WHERE cars_data.Cylinders = 3",
"gold": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1;",
"db_id": "car_1",
"question": "What is the maximum horsepower and the make of the car models with 3 cylinders?",
"reason": "slack off, 'select A From B'"
},
{
"index": 132,
"hardness": "extra",
"pred": "SELECT Max(cars_data.Horsepower), Max(cars_data.Horsepower) FROM cars_data WHERE cars_data.Cylinders = 3",
"gold": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1;",
"db_id": "car_1",
"question": "What is the largest amount of horsepower for the models with 3 cylinders and what make is it?",
"reason": "slack off"
},
{
"index": 133,
"hardness": "hard",
"pred": "SELECT model_list.Model FROM model_list GROUP BY model_list.Model ORDER BY Sum(cars_data.MPG) Desc LIMIT 1",
"gold": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1;",
"db_id": "car_1",
"question": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon.",
"reason": "slack off, WRONG JOIN"
},
{
"index": 134,
"hardness": "hard",
"pred": "SELECT model_list.Model FROM cars_data ORDER BY cars_data.MPG Desc LIMIT 1",
"gold": "select t1.model from car_names as t1 join cars_data as t2 on t1.makeid = t2.id order by t2.mpg desc limit 1;",
"db_id": "car_1",
"question": "What is the car model with the highest mpg ?",
"reason": "slack off, 'select A From B'"
},
{
"index": 138,
"hardness": "medium",
"pred": "SELECT Avg(cars_data.Edispl) FROM cars_data",
"gold": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';",
"db_id": "car_1",
"question": "What is the average edispl for all volvos?",
"reason": "slack off, WRONG JOIN"
},
{
"index": 141,
"hardness": "hard",
"pred": "SELECT model_list.Model FROM model_list JOIN car_names ON model_list.Model = car_names.Model GROUP BY model_list.Model ORDER BY Count(*) Desc LIMIT 1",
"gold": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;",
"db_id": "car_1",
"question": "Which model has the most version(make) of cars?",
"reason": "both right"
},
{
"index": 142,
"hardness": "hard",
"pred": "SELECT model_list.Model FROM model_list GROUP BY model_list.Model ORDER BY Count(*) Desc LIMIT 1",
"gold": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;",
"db_id": "car_1",
"question": "What model has the most different versions?",
"reason": "both right"
},
{
"index": 149,
"hardness": "medium",
"pred": "SELECT car_makers.Maker, car_makers.FullName, car_makers.Id FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker GROUP BY car_makers.Id HAVING Count(*) > 3",
"gold": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;",
"db_id": "car_1",
"question": "Which makers designed more than 3 car models? List full name and the id.",
"reason": "wrong select"
},
{
"index": 150,
"hardness": "medium",
"pred": "SELECT car_makers.Maker, car_makers.Id FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker GROUP BY car_makers.Id HAVING Count(*) > 3",
"gold": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;",
"db_id": "car_1",
"question": "What are the names and ids of all makers with more than 3 models?",
"reason": "wrong select"
},
{
"index": 151,
"hardness": "extra",
"pred": "SELECT DISTINCT model_list.Model FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker WHERE car_makers.FullName = \" General Motors \" OR cars_data.Weight > 3500",
"gold": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;",
"db_id": "car_1",
"question": "Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?",
"reason": "slack off, 'select A From B'"
},
{
"index": 152,
"hardness": "extra",
"pred": "SELECT DISTINCT model_list.Model FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker WHERE car_makers.Maker = \" General Motors \" OR car_makers.Maker > 3500",
"gold": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;",
"db_id": "car_1",
"question": "What are the different models created by either the car maker General Motors or weighed more than 3500?",
"reason": "slack off, 'select A From B'"
},
{
"index": 153,
"hardness": "easy",
"pred": "SELECT cars_data.Year FROM cars_data WHERE cars_data.Weight < 3000 INTERSECT SELECT cars_data.Year FROM cars_data WHERE cars_data.Weight > 4000",
"gold": "select distinct year from cars_data where weight between 3000 and 4000;",
"db_id": "car_1",
"question": "In which years cars were produced weighing no less than 3000 and no more than 4000 ?",
"reason": "both right"
},
{
"index": 154,
"hardness": "easy",
"pred": "SELECT cars_data.Year FROM cars_data WHERE cars_data.Weight < 4000 INTERSECT SELECT cars_data.Year FROM cars_data WHERE cars_data.Weight > 3000",
"gold": "select distinct year from cars_data where weight between 3000 and 4000;",
"db_id": "car_1",
"question": "What are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000 ?",
"reason": "both right"
},
{
"index": 157,
"hardness": "extra",
"pred": "SELECT cars_data.Cylinders FROM cars_data WHERE cars_data.Accelerate = \" volvo \" ORDER BY cars_data.Accelerate Asc LIMIT 1",
"gold": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1;",
"db_id": "car_1",
"question": "For model volvo, how many cylinders does the car with the least accelerate have?",
"reason": "slack off"
},
{
"index": 158,
"hardness": "extra",
"pred": "SELECT cars_data.Cylinders FROM cars_data WHERE cars_data.Accelerate = \" volvo \" ORDER BY cars_data.Accelerate Asc LIMIT 1",
"gold": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1;",
"db_id": "car_1",
"question": "For a volvo model, how many cylinders does the version with least accelerate have?",
"reason": "slack off"
},
{
"index": 159,
"hardness": "hard",
"pred": "SELECT Count(*) FROM cars_data WHERE cars_data.Accelerate > (SELECT Max(cars_data.Accelerate) FROM cars_data)",
"gold": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );",
"db_id": "car_1",
"question": "How many cars have a larger accelerate than the car with the largest horsepower?",
"reason": "slack off"
},
{
"index": 160,
"hardness": "hard",
"pred": "SELECT Count(*) FROM cars_data WHERE cars_data.Accelerate > (SELECT Max(cars_data.Accelerate) FROM cars_data)",
"gold": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );",
"db_id": "car_1",
"question": "What is the number of cars with a greater accelerate than the one with the most horsepower?",
"reason": "slack off"
},
{
"index": 161,
"hardness": "medium",
"pred": "SELECT Count(*) FROM (SELECT car_makers.Country FROM car_makers GROUP BY car_makers.Country HAVING Count(*) > 2)",
"gold": "select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2",
"db_id": "car_1",
"question": "How many countries has more than 2 car makers ?",
"wrong": "wrong gold"
},
{
"index": 162,
"hardness": "medium",
"pred": "SELECT Count(*) FROM (SELECT car_makers.Country FROM car_makers GROUP BY car_makers.Country HAVING Count(*) > 2)",
"gold": "select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2",
"db_id": "car_1",
"question": "What is the number of countries with more than 2 car makers ?",
"wrong": "wrong gold"
},
{
"index": 165,
"hardness": "extra",
"pred": "SELECT cars_data.Horsepower FROM cars_data WHERE cars_data.Cylinders = 4 ORDER BY cars_data.Horsepower Desc LIMIT 1",
"gold": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;",
"db_id": "car_1",
"question": "For the cars with 4 cylinders, which model has the largest horsepower?",
"reason": "slack off"
},
{
"index": 166,
"hardness": "extra",
"pred": "SELECT model_list.Model FROM cars_data WHERE cars_data.Cylinders = \" 4 \" ORDER BY cars_data.Horsepower Desc LIMIT 1",
"gold": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;",
"db_id": "car_1",
"question": "For all of the 4 cylinder cars, which model has the most horsepower?",
"reason": "slack off, 'select A From B'"
},
{
"index": 167,
"hardness": "extra",
"pred": "SELECT *, car_names.Make FROM car_names JOIN cars_data ON car_names.MakeId = cars_data.Id WHERE cars_data.Horsepower < 3 GROUP BY car_names.MakeId",
"gold": "SELECT T2.MakeId , T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT min(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3;",
"db_id": "car_1",
"question": "Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.",
"reason": "'makeid', 'cylinders', no_link, problem in similarity"
},
{
"index": 168,
"hardness": "extra",
"pred": "SELECT car_names.MakeId, car_names.Make FROM cars_data JOIN car_names ON cars_data.Id = car_names.MakeId WHERE cars_data.Cylinders < 4 AND cars_data.Horsepower != (SELECT Min(cars_data.Horsepower) FROM cars_data)",
"gold": "select t2.makeid , t2.make from cars_data as t1 join car_names as t2 on t1.id = t2.makeid where t1.horsepower > (select min(horsepower) from cars_data) and t1.cylinders < 4;",
"db_id": "car_1",
"question": "Among the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders ?",
"reason": "both right"
},
{
"index": 171,
"hardness": "extra",
"pred": "SELECT model_list.Model FROM model_list WHERE model_list.Maker < 3500 EXCEPT SELECT model_list.Model FROM model_list JOIN car_makers ON model_list.Maker = car_makers.Id WHERE car_makers.FullName = \" Ford Motor Company \"",
"gold": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company';",
"db_id": "car_1",
"question": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'?",
"reason": "too diffcult, no link about 3500"
},
{
"index": 172,
"hardness": "extra",
"pred": "SELECT DISTINCT model_list.Model FROM model_list JOIN model_list WHERE car_makers.FullName < 3500 EXCEPT SELECT model_list.Model FROM car_makers ON car_makers.Id = car_makers.Id JOIN model_list WHERE car_makers.FullName = \" Ford Motor Company \"",
"gold": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company';",
"db_id": "car_1",
"question": "What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company?",
"reason": "too diffcult, no link about 3500"
},
{
"index": 173,
"hardness": "hard",
"pred": "SELECT countries.CountryName FROM countries WHERE countries.CountryId NOT IN (SELECT car_makers.Country FROM car_makers)",
"gold": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;",
"db_id": "car_1",
"question": "What are the name of the countries where there is not a single car maker?",
"reason": "both right"
},
{
"index": 174,
"hardness": "hard",
"pred": "SELECT countries.CountryName FROM countries WHERE countries.CountryId NOT IN (SELECT car_makers.Country FROM car_makers)",
"gold": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;",
"db_id": "car_1",
"question": "What are the names of the countries with no car makers?",
"reason": "both right"
},
{
"index": 175,
"hardness": "extra",
"pred": "SELECT car_makers.Id, car_makers.Maker FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker GROUP BY car_makers.Id HAVING Count(*) >= 2 INTERSECT SELECT car_makers.Id, car_makers.Maker FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker GROUP BY car_makers.Id HAVING Count(*) > 2",
"gold": "select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker group by t1.id having count(*) >= 2 intersect select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker join car_names as t3 on t2.model = t3.model group by t1.id having count(*) > 3;",
"db_id": "car_1",
"question": "Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker .",
"reason": "slack off"
},
{
"index": 176,
"hardness": "extra",
"pred": "SELECT car_makers.Id, car_makers.Maker FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker GROUP BY car_makers.Id HAVING Count(*) >= 2 INTERSECT SELECT car_makers.Id, car_makers.Maker FROM car_makers JOIN model_list ON car_makers.Id = model_list.Maker GROUP BY car_makers.Id HAVING Count(*) > 3",
"gold": "SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) >= 2 INTERSECT SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING count(*) > 3;",
"db_id": "car_1",
"question": "What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?",
"reason": "slack off"
},
{
"index": 177,
"hardness": "extra",
"pred": "SELECT countries.CountryId, countries.CountryName FROM countries JOIN car_makers ON countries.CountryId = car_makers.Country GROUP BY countries.CountryId HAVING Count(*) > 3 UNION SELECT countries.CountryId, countries.CountryName FROM countries JOIN car_makers ON countries.CountryId = car_makers.Country WHERE model_list.Model = \" fiat \" GROUP BY countries.CountryId HAVING Count(*) > 3",
"gold": "SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat';",
"db_id": "car_1",
"question": "What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?",
"reason": "slack off, 'select A From B'"
},
{
"index": 178,
"hardness": "extra",
"pred": "SELECT countries.CountryId, countries.CountryName FROM countries JOIN car_makers ON countries.CountryId = car_makers.Country GROUP BY countries.CountryId HAVING Count(*) > 3 UNION SELECT countries.CountryId, countries.CountryName FROM countries JOIN car_makers ON countries.CountryId = car_makers.Country JOIN model_list ON car_makers.Id = model_list.Maker WHERE model_list.Model = \" fiat \" GROUP BY countries.CountryId HAVING Count(*) > 3",
"gold": "select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 3 union select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country join model_list as t3 on t2.id = t3.maker where t3.model = 'fiat';",
"db_id": "car_1",
"question": "What are the ids and names of all countries that either have more than 3 car makers or produce fiat model ?",
"reason": "slack off, 'select A From B'"
},
{
"index": 211,
"hardness": "hard",
"pred": "SELECT Count(*) FROM airports JOIN flights ON flights.DestAirport = airports.AirportCode WHERE airports.City = \" Aberdeen Aberdeen \" AND airports.AirportName = \" Ashley \"",
"gold": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"",
"db_id": "flight_2",
"question": "How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?",
"reason": "don't understand database"
},
{
"index": 212,
"hardness": "hard",
"pred": "SELECT Count(*) FROM airports JOIN flights ON flights.SourceAirport = airports.AirportCode WHERE airports.City = \" Aberdeen \" AND airports.AirportName = \" Ashley \"",
"gold": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"",
"db_id": "flight_2",
"question": "How many flights fly from Aberdeen to Ashley?",
"reason": "don't understand database"
},
{
"index": 214,
"hardness": "medium",
"pred": "SELECT Count(*) FROM airlines WHERE airlines.Airline = \" Jetue Airways \"",
"gold": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"",
"db_id": "flight_2",
"question": "Give the number of Jetblue Airways flights.",
"reason": "don't understand database"
},
{
"index": 215,
"hardness": "medium",
"pred": "SELECT Count(*) FROM airlines JOIN flights ON airlines.uid = flights.Airline WHERE airlines.Airline = \" AS \" AND airlines.Airline = \" United \"",
"gold": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"",
"db_id": "flight_2",
"question": "How many 'United Airlines' flights go to Airport 'ASY'?",
"reason": "slack off"
},
{
"index": 219,
"hardness": "hard",
"pred": "SELECT Count(*) FROM airports JOIN flights ON airports.AirportCode = flights.SourceAirport WHERE airports.City = \" Aberdeen Aberdeen \" AND airlines.Airline = \" United \"",
"gold": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"",
"db_id": "flight_2",
"question": "How many United Airlines flights go to City 'Aberdeen'?",
"reason": "slack off"
},
{
"index": 222,
"hardness": "extra",
"pred": "SELECT airports.City FROM airports JOIN flights ON airports.AirportCode = flights.DestAirport GROUP BY flights.DestAirport ORDER BY Count(*) Desc LIMIT 1",
"gold": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1",
"db_id": "flight_2",
"question": "Which city has the most frequent destination airport?",
"reason": "both right, but GROUP BY code is better"
},
{
"index": 224,
"hardness": "extra",
"pred": "SELECT airports.City FROM airports GROUP BY airports.City ORDER BY Count(*) Desc LIMIT 1",
"gold": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1",
"db_id": "flight_2",
"question": "Which city is the most frequent source airport?",
"reason": "slack off, source airport"
},
{
"index": 228,
"hardness": "extra",
"pred": "SELECT airports.AirportCode FROM flights GROUP BY flights.SourceAirport ORDER BY Count(*) Asc LIMIT 1",
"gold": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1",
"db_id": "flight_2",
"question": "Give the code of the airport with the least flights.",
"reason": "slack off, 'select A From B'"
},
{
"index": 230,
"hardness": "extra",
"pred": "SELECT airlines.Airline FROM airlines JOIN flights ON airlines.uid = flights.Airline GROUP BY flights.Airline ORDER BY Count(*) Desc LIMIT 1",
"gold": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1",
"db_id": "flight_2",
"question": "What airline serves the most flights?",
"reason": "both right"
},
{
"index": 231,
"hardness": "extra",
"pred": "SELECT airlines.Abbreviation, airlines.Country FROM airlines JOIN flights ON airlines.uid = flights.Airline GROUP BY flights.Airline ORDER BY Count(*) Asc LIMIT 1",
"gold": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1",
"db_id": "flight_2",
"question": "Find the abbreviation and country of the airline that has fewest number of flights?",
"reason": "both right"
},
{
"index": 232,
"hardness": "extra",
"pred": "SELECT airlines.Abbreviation, airlines.Country FROM airlines JOIN flights ON airlines.uid = flights.Airline GROUP BY airlines.Abbreviation ORDER BY Count(*) Asc LIMIT 1",
"gold": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1",
"db_id": "flight_2",
"question": "What is the abbreviation of the airilne has the fewest flights and what country is it in?",
"reason": "both right"
},
{
"index": 241,
"hardness": "medium",
"pred": "SELECT airlines.Airline FROM airlines JOIN flights ON airlines.uid = flights.Airline GROUP BY flights.Airline HAVING Count(*) >= 10",
"gold": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10",
"db_id": "flight_2",
"question": "Find all airlines that have at least 10 flights.",
"reason": "both right"
},
{
"index": 242,
"hardness": "medium",
"pred": "SELECT airlines.Airline FROM airlines JOIN flights ON airlines.uid = flights.Airline GROUP BY flights.Airline HAVING Count(*) >= 10",
"gold": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10",
"db_id": "flight_2",
"question": "Which airlines have at least 10 flights?",
"reason": "both right"
},
{
"index": 243,
"hardness": "medium",
"pred": "SELECT airlines.Airline FROM flights GROUP BY flights.Airline HAVING Count(*) < 200",
"gold": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200",
"db_id": "flight_2",
"question": "Find all airlines that have fewer than 200 flights.",
"reason": "slack off, 'select A From B'"
},
{
"index": 244,
"hardness": "medium",
"pred": "SELECT airlines.Airline FROM airlines JOIN flights ON airlines.uid = flights.Airline WHERE flights.FlightNo < 200",
"gold": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200",
"db_id": "flight_2",
"question": "Which airlines have less than 200 flights?",
"reason": "wrong understanding of '200'"
},
{
"index": 255,
"hardness": "hard",
"pred": "SELECT Count(*) FROM airports WHERE airports.City = \" Aberdeen Aberdeen \" OR airports.City = \" Abilene \"",
"gold": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"",
"db_id": "flight_2",
"question": "Find the number of flights landing in the city of Aberdeen or Abilene.",
"reason": "can't understand 'landing in'"
},
{
"index": 256,
"hardness": "hard",
"pred": "SELECT Count(*) FROM airports WHERE airports.City = \" Aberdeen Aberdeen \" OR airports.City = \" Ab \"",
"gold": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"",
"db_id": "flight_2",
"question": "How many flights land in Aberdeen or Abilene?",
"reason": "can't understand 'land in'"
},
{
"index": 257,
"hardness": "hard",
"pred": "SELECT airports.AirportName FROM airports WHERE airports.AirportCode NOT IN (SELECT flights.SourceAirport FROM flights)",
"gold": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)",
"db_id": "flight_2",
"question": "Find the name of airports which do not have any flight in and out.",
"reason": "can't understand 'in and out'"
},
{
"index": 258,
"hardness": "hard",
"pred": "SELECT airports.AirportName FROM airports EXCEPT SELECT airports.AirportName FROM airports JOIN flights ON airports.AirportCode = flights.DestAirport",
"gold": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)",
"db_id": "flight_2",
"question": "Which airports do not have departing or arriving flights?",
"reason": "can't understand 'departing or arriving'"
},
{
"index": 270,
"hardness": "medium",
"pred": "SELECT shop.Manager_name, shop.District FROM shop GROUP BY shop.Name ORDER BY Sum(shop.Number_products) Desc LIMIT 1",
"gold": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1",
"db_id": "employee_hire_evaluation",
"question": "What are the manager name and district of the shop that sells the largest number of products?"
},
{
"index": 279,
"hardness": "hard",
"pred": "SELECT employee.Name FROM evaluation JOIN employee ON evaluation.Employee_ID = employee.Employee_ID GROUP BY evaluation.Employee_ID ORDER BY Count(*) Desc LIMIT 1",
"gold": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1",
"db_id": "employee_hire_evaluation",
"question": "Find the name of the employee who got the highest one time bonus."
},
{
"index": 284,
"hardness": "extra",
"pred": "SELECT shop.Name FROM hiring JOIN shop ON hiring.Shop_ID = shop.Shop_ID GROUP BY hiring.Shop_ID ORDER BY Count(hiring.Employee_ID) Desc LIMIT 1",
"gold": "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1",
"db_id": "employee_hire_evaluation",
"question": "Which shop has the most employees? Give me the shop name."
},
{
"index": 287,
"hardness": "medium",
"pred": "SELECT Count(*), hiring.Shop_ID FROM hiring JOIN shop ON hiring.Shop_ID = shop.Shop_ID GROUP BY hiring.Shop_ID",
"gold": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name",
"db_id": "employee_hire_evaluation",
"question": "Find the number of employees hired in each shop; show the shop name as well."
},
{
"index": 288,
"hardness": "medium",
"pred": "SELECT Count(*), shop.Name FROM hiring JOIN shop ON hiring.Shop_ID = shop.Shop_ID GROUP BY shop.Shop_ID",
"gold": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name",
"db_id": "employee_hire_evaluation",
"question": "For each shop, return the number of employees working there and the name of the shop."
},
{
"index": 307,
"hardness": "medium",
"pred": "SELECT Count(*) FROM Templates WHERE Templates.Template_Type_Code = \" PP \"",
"gold": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'",
"db_id": "cre_Doc_Template_Mgt",
"question": "How many documents are using the template with type code 'PPT'?"
},
{
"index": 308,
"hardness": "medium",
"pred": "SELECT Count(*) FROM Templates WHERE Templates.Template_Type_Code = \" PP \"",
"gold": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'",
"db_id": "cre_Doc_Template_Mgt",
"question": "Count the number of documents that use the PPT template type."
},
{
"index": 335,
"hardness": "medium",
"pred": "SELECT Templates.Version_Number, Templates.Template_Type_Code FROM Templates",
"gold": "SELECT min(Version_Number) , template_type_code FROM Templates",
"db_id": "cre_Doc_Template_Mgt",
"question": "What the smallest version number and its template type code?"
},
{
"index": 336,
"hardness": "medium",
"pred": "SELECT Templates.Version_Number, Templates.Template_Type_Code FROM Templates ORDER BY Templates.Date_Effective_To Asc LIMIT 1",
"gold": "SELECT min(Version_Number) , template_type_code FROM Templates",
"db_id": "cre_Doc_Template_Mgt",
"question": "Return the lowest version number, along with its corresponding template type code."
},
{
"index": 341,
"hardness": "medium",
"pred": "SELECT Templates.Template_Type_Code, Count(*) FROM Templates GROUP BY Templates.Template_Type_Code",
"gold": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code",
"db_id": "cre_Doc_Template_Mgt",
"question": "Show all template type codes and the number of documents using each type."
},
{
"index": 342,
"hardness": "medium",
"pred": "SELECT Templates.Template_Type_Code, Count(*) FROM Templates GROUP BY Templates.Template_Type_Code",
"gold": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code",
"db_id": "cre_Doc_Template_Mgt",
"question": "What are the different template type codes, and how many documents use each type?"
},
{
"index": 343,
"hardness": "extra",
"pred": "SELECT Templates.Template_Type_Code FROM Templates GROUP BY Templates.Template_Type_Code ORDER BY Count(*) Desc LIMIT 1",
"gold": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1",
"db_id": "cre_Doc_Template_Mgt",
"question": "Which template type code is used by most number of documents?"
},
{
"index": 344,
"hardness": "extra",
"pred": "SELECT Templates.Template_Type_Code FROM Templates GROUP BY Templates.Template_Type_Code ORDER BY Count(*) Desc LIMIT 1",
"gold": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1",
"db_id": "cre_Doc_Template_Mgt",
"question": "Return the code of the template type that is most commonly used in documents."
},
{
"index": 345,
"hardness": "hard",
"pred": "SELECT Ref_Template_Types.Template_Type_Code FROM Ref_Template_Types EXCEPT SELECT Templates.Template_Type_Code FROM Templates",