-
Notifications
You must be signed in to change notification settings - Fork 3
/
Spider-DK.json
3212 lines (3212 loc) · 138 KB
/
Spider-DK.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
[
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT count(*) FROM singer",
"question": "How many singers do we have?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT count(*) FROM singer",
"question": "What is the total number of singers?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT name , country FROM singer ORDER BY birthday ASC",
"question": "Show name, country for all singers ordered by age from the oldest to the youngest."
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT name , country FROM singer ORDER BY birthday ASC",
"question": "What are the names, countries for every singer in descending order of age?"
},
{
"type": 3,
"db_id": "new_concert_singer",
"query": "SELECT avg(Singer_ID) , min(Singer_ID) , max(Singer_ID) FROM singer WHERE country = 'France'",
"question": "What is the average, minimum, and maximum id of all French singers?"
},
{
"type": 3,
"db_id": "new_concert_singer",
"query": "SELECT avg(Singer_ID) , min(Singer_ID) , max(Singer_ID) FROM singer WHERE country = 'France'",
"question": "What is the average, minimum, and maximum id for French singers?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT song_name , song_release_year FROM singer ORDER BY birthday desc LIMIT 1",
"question": "Show the name and the release year of the song by the youngest singer."
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT song_name , song_release_year FROM singer ORDER BY birthday desc LIMIT 1",
"question": "What are the names and release years for all the songs of the youngest singer?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT DISTINCT country FROM singer WHERE birthday like '2001%'",
"question": "What are all distinct countries where singers born in 2001 are from?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT DISTINCT country FROM singer WHERE birthday like '2001%'",
"question": "What are the different countries with singers born in 2001?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT country , count(*) FROM singer GROUP BY country",
"question": "Show all countries and the number of singers in each country."
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT country , count(*) FROM singer GROUP BY country",
"question": "How many singers are from each country?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT song_name FROM singer WHERE birthday < (SELECT avg(birthday) FROM singer)",
"question": "List all song names by singers above the average age."
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT song_name FROM singer WHERE birthday < (SELECT avg(birthday) FROM singer)",
"question": "What are all the song names by singers who are older than average?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000",
"question": "Show location and name for all stadiums with a capacity between 5000 and 10000."
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000",
"question": "What are the locations and names of all stations with capacity between 5000 and 10000?"
},
{
"type": 5,
"db_id": "new_concert_singer",
"query": "SELECT avg(capacity) , max(capacity) FROM stadium",
"question": "What is the average and the highest capacity of all stadiums?"
},
{
"type": 5,
"db_id": "new_concert_singer",
"query": "SELECT avg(capacity) , max(capacity) FROM stadium",
"question": "What is the average and highest capacities for all stations?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1",
"question": "What is the name and capacity for the stadium with highest average attendance?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1",
"question": "What is the name and capacity for the stadium with the highest average attendance?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT count(*) FROM concert WHERE YEAR >= 2014",
"question": "How many concerts are there after or in year 2014?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT count(*) FROM concert WHERE YEAR >= 2014",
"question": "How many concerts occurred after or in 2014?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id",
"question": "Show the stadium name and the number of concerts in each stadium."
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id",
"question": "For each stadium, how many concerts play there?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT T2.name , T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1",
"question": "Show the stadium name and capacity with most number of concerts in year 2014 or after."
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT T2.name , T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1",
"question": "What is the name and highest attendance of the stadium with the most concerts after 2013?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT concert_Name FROM concert ORDER BY YEAR asc LIMIT 1",
"question": "Which concert is the oldest?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT concert_Name FROM concert ORDER BY YEAR asc LIMIT 1",
"question": "Return the oldest concert name?"
},
{
"type": 5,
"db_id": "new_concert_singer",
"query": "SELECT highest FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)",
"question": "Show the highest attendance without any concert."
},
{
"type": 5,
"db_id": "new_concert_singer",
"query": "SELECT lowest FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)",
"question": "What are lowest attendance of the stadiums without any concerts?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT country FROM singer WHERE birthday like '1981%' or birthday like '1991%'",
"question": "Show countries where a singer born in 1981 or 1991 are from."
},
{
"type": 5,
"db_id": "new_concert_singer",
"query": "SELECT average FROM stadium EXCEPT SELECT T2.average FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014",
"question": "Show average attendance for all stadiums except for stadiums having a concert in year 2014."
},
{
"type": 5,
"db_id": "new_concert_singer",
"query": "SELECT lowest FROM stadium EXCEPT SELECT T2.lowest FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014",
"question": "What are the lowest attendance of all stadiums that did not have a concert in 2014?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id",
"question": "Show the name and theme for all concerts and the number of singers in each concert."
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id",
"question": "What are the names, themes, and number of singers for each and every concert?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "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",
"question": "List singer names and number of concerts for each singer."
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "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",
"question": "What are the names of the singers and number of concerts for each person?"
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year >= 2014",
"question": "List all singer names in concerts after or in year 2014."
},
{
"type": 2,
"db_id": "new_concert_singer",
"query": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year <= 2014",
"question": "What are the names of the singers who performed in a concert before or in 2014?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'",
"question": "what is the name and nation of the singer who have a song having 'Hey' in its name?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'",
"question": "What is the name and country of origin of every singer who has a song with the word 'Hey' in its title?"
},
{
"type": 5,
"db_id": "new_concert_singer",
"query": "SELECT T2.lowest , T2.highest FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015",
"question": "Find the lowest and highest attendance of the stadiums which some concerts happened in the years of both 2014 and 2015."
},
{
"type": 5,
"db_id": "new_concert_singer",
"query": "SELECT T2.lowest , T2.highest FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015",
"question": "What are the lowest and highest attendance of the stadiums that had concerts that occurred in both 2014 and 2015?"
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id ORDER BY T2.Capacity DESC LIMIT 1",
"question": "Find the number of concerts happened in the stadium with the highest capacity."
},
{
"type": 0,
"db_id": "new_concert_singer",
"query": "SELECT count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id ORDER BY T2.Capacity DESC LIMIT 1",
"question": "What are the number of concerts that occurred in the stadium with the largest capacity?"
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT count(*) FROM pets WHERE weight > 10",
"question": "Find the number of pets whose weight is heavier than 10."
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT count(*) FROM pets WHERE weight > 10",
"question": "How many pets have a greater weight than 10?"
},
{
"type": 2,
"db_id": "new_pets_1",
"query": "SELECT weight FROM pets ORDER BY birthdate desc LIMIT 1",
"question": "Find the weight of the youngest dog."
},
{
"type": 2,
"db_id": "new_pets_1",
"query": "SELECT weight FROM pets ORDER BY birthdate desc LIMIT 1",
"question": "How much does the youngest dog weigh?"
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT max(weight) , petType FROM pets GROUP BY petType",
"question": "Find the maximum weight for each type of pet. List the maximum weight and pet type."
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT max(weight) , petType FROM pets GROUP BY petType",
"question": "List the maximum weight and type for each type of pet."
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20",
"question": "Find number of pets owned by students who are older than 20."
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20",
"question": "How many pets are owned by students that have an age greater than 20?"
},
{
"type": 34,
"db_id": "new_pets_1",
"query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'",
"question": "Find the number of puppy pets that are raised by female students (with sex F)."
},
{
"type": 34,
"db_id": "new_pets_1",
"query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'",
"question": "How many puppy pets are raised by female students?"
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT count(DISTINCT pettype) FROM pets",
"question": "Find the number of distinct type of pets."
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT count(DISTINCT pettype) FROM pets",
"question": "How many different types of pet are there?"
},
{
"type": 3,
"db_id": "new_pets_1",
"query": "SELECT DISTINCT T1.Fname 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' OR T3.pettype = 'dog'",
"question": "Find the first name of students who have kitten or puppy pet."
},
{
"type": 3,
"db_id": "new_pets_1",
"query": "SELECT DISTINCT T1.Fname 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' OR T3.pettype = 'dog'",
"question": "What are the first names of every student who has a kitten or puppy as a pet?"
},
{
"type": 3,
"db_id": "new_pets_1",
"query": "SELECT T1.Fname 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' INTERSECT SELECT T1.Fname 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'",
"question": "Find the name of students who have both Kitten and puppy pets."
},
{
"type": 3,
"db_id": "new_pets_1",
"query": "SELECT T1.Fname 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' INTERSECT SELECT T1.Fname 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'",
"question": "What are the students' first names who have both kitten and puppy as pets?"
},
{
"type": 3,
"db_id": "new_pets_1",
"query": "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')",
"question": "Find the major and age of students who do not have a kitten pet."
},
{
"type": 3,
"db_id": "new_pets_1",
"query": "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')",
"question": "What major is every student who does not own a kitten as a pet, and also how old are they?"
},
{
"type": 3,
"db_id": "new_pets_1",
"query": "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'",
"question": "Find the id of students who do not have a kitten pet."
},
{
"type": 3,
"db_id": "new_pets_1",
"query": "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'",
"question": "What are the ids of the students who do not own kittens as pets?"
},
{
"type": 3,
"db_id": "new_pets_1",
"query": "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')",
"question": "Find the first name and age of students who have a dog but do not have a puppy as a pet."
},
{
"type": 3,
"db_id": "new_pets_1",
"query": "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')",
"question": "What is the first name of every student who has a puppy but does not have a kitten?"
},
{
"type": 2,
"db_id": "new_pets_1",
"query": "SELECT pettype , weight FROM pets ORDER BY birthdate desc LIMIT 1",
"question": "Find the type and weight of the youngest pet."
},
{
"type": 2,
"db_id": "new_pets_1",
"query": "SELECT pettype , weight FROM pets ORDER BY birthdate desc LIMIT 1",
"question": "What type of pet is the youngest animal, and how much does it weigh?"
},
{
"type": 2,
"db_id": "new_pets_1",
"query": "SELECT petid , weight FROM pets WHERE birthdate < '2020-01-01'",
"question": "Find the id and weight of all pets older than that born in 2020."
},
{
"type": 2,
"db_id": "new_pets_1",
"query": "SELECT petid , weight FROM pets WHERE birthdate < '2020-05-01'",
"question": "What is the id and weight of every pet who is older than that born in 2020?"
},
{
"type": 5,
"db_id": "new_pets_1",
"query": "SELECT avg(PetID) , max(PetID) , pettype FROM pets GROUP BY pettype",
"question": "Find the average and maximum id for each type of pet."
},
{
"type": 5,
"db_id": "new_pets_1",
"query": "SELECT avg(PetID) , max(PetID) , pettype FROM pets GROUP BY pettype",
"question": "What is the average and maximum id for each pet type?"
},
{
"type": 5,
"db_id": "new_pets_1",
"query": "SELECT avg(PetID) , max(PetID) , pettype FROM pets GROUP BY pettype",
"question": "Find the average and maximum id for each pet type."
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype",
"question": "What is the average weight for each type of pet?"
},
{
"type": 1,
"db_id": "new_pets_1",
"query": "SELECT DISTINCT T1.fname , T1.LName , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid",
"question": "Find the name and age of students who have a pet."
},
{
"type": 1,
"db_id": "new_pets_1",
"query": "SELECT DISTINCT T1.fname , T1.LName T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid",
"question": "What are the different names and ages of the students who do have pets?"
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'",
"question": "Find the id of the pet owned by student whose last name is \u2018Smith\u2019."
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'",
"question": "What is the id of the pet owned by the student whose last name is 'Smith'?"
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid",
"question": "Find the number of pets for each student who has any pet and student id."
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid",
"question": "For students who have pets, how many pets does each student have?"
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1",
"question": "Find the first name and gender of student who have more than one pet."
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1",
"question": "What is the first name and gender of the all the students who have more than one pet?"
},
{
"type": 23,
"db_id": "new_pets_1",
"query": "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.birthdate like '2001%' AND T3.pettype = 'cat'",
"question": "Find the last name of the student who has a cat that born in 2001."
},
{
"type": 23,
"db_id": "new_pets_1",
"query": "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.birthdate like '2001%' AND T3.pettype = 'cat'",
"question": "What is the last name of the student who has a cat that born in 2001?"
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid)",
"question": "Find the average age of students who do not have any pet."
},
{
"type": 0,
"db_id": "new_pets_1",
"query": "SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid)",
"question": "What is the average age for all students who do not own any pets?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT count(*) FROM CONTINENTS;",
"question": "How many continents are there?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT count(*) FROM CONTINENTS;",
"question": "What is the number of continents?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;",
"question": "How many countries does each continent have? List the continent id, continent name and the number of countries."
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;",
"question": "For each continent, list its id, name, and how many countries it has?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT count(*) FROM COUNTRIES;",
"question": "How many countries are listed?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT count(*) FROM COUNTRIES;",
"question": "How many countries exist?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "How many models does each car maker produce? List maker full name, id and the number."
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What is the full name of each car maker, along with its id and how many models it produces?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "Which model of the car has the minimum horsepower?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What is the model of the car with the smallest amount of horsepower?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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)",
"question": "Find the model of the car whose weight is below the average weight."
},
{
"type": 0,
"db_id": "car_1",
"query": "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)",
"question": "What is the model for the car with a weight smaller than the average?"
},
{
"type": 2,
"db_id": "car_1",
"query": "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 >= '2019';",
"question": "Find the name of the makers that produced some cars in the past two years?"
},
{
"type": 2,
"db_id": "car_1",
"query": "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 >= '2019';",
"question": "What is the name of the different car makers who produced a car in the past two years?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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);",
"question": "Find the make and production time of the cars that were produced in the earliest year?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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);",
"question": "What is the maker of the carr produced in the earliest year and what year was it?"
},
{
"type": 2,
"db_id": "car_1",
"query": "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;",
"question": "Which distinct car models are the produced before or in 1980?"
},
{
"type": 2,
"db_id": "car_1",
"query": "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;",
"question": "What are the different models for the cards produced before or in 1980?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "How many car makers are there in each continents? List the continent name and the count."
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What is the name of each continent and how many car makers are there in each one?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;",
"question": "Which of the countries has the most car makers? List the country name."
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;",
"question": "What is the name of the country with the most car makers?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id;",
"question": "How many car models are produced by each maker? List the count and the maker full name."
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id;",
"question": "What is the number of car models that are produced by each maker and what is the id and full name of each maker?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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)';",
"question": "What is the accelerate of the car make amc hornet sportabout (sw)?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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)';",
"question": "How much does the car accelerate that makes amc hornet sportabout (sw)?"
},
{
"type": 3,
"db_id": "car_1",
"query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'Japan';",
"question": "How many Japanese car makers are there?"
},
{
"type": 3,
"db_id": "car_1",
"query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'Japan';",
"question": "What is the number of makers of Japanese care?"
},
{
"type": 3,
"db_id": "car_1",
"query": "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';",
"question": "How many car models are produced in the america?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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';",
"question": "What is the count of the car models produced in the United States?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4;",
"question": "What is the average miles per gallon(mpg) of the cars with 4 cylinders?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4;",
"question": "What is the average miles per gallon of all the cards with 4 cylinders?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 4 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1;",
"question": "What is the smallest weight of the car produced with 8 cylinders on 1974?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 4 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1;",
"question": "What is the minimu weight of the car with 8 cylinders produced in 1974?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT Maker , Model FROM MODEL_LIST;",
"question": "What are all the makers and models?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT Maker , Model FROM MODEL_LIST;",
"question": "What are the makers and models?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What are the countries having at least one car maker? List name and id."
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What are the names and ids of all countries with at least one car maker?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150;",
"question": "What is the number of the cars with horsepower more than 150?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150;",
"question": "What is the number of cars with a horsepower greater than 150?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;",
"question": "What is the average weight of cars each year?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;",
"question": "What is the average weight and year for each year?"
},
{
"type": 2,
"db_id": "car_1",
"query": "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;",
"question": "Which European countries have at least 3 car manufacturers?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What are the names of all European countries with at least 3 manufacturers?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What is the maximum horsepower and the make of the car models with 3 cylinders?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What is the largest amount of horsepower for the models with 3 cylinders and what make is it?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon."
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What is the car wmodel with the highest mpg?"
},
{
"type": 2,
"db_id": "car_1",
"query": "SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR <= 1980;",
"question": "What is the average horsepower of the cars before or in 1980?"
},
{
"type": 2,
"db_id": "car_1",
"query": "SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR <= 1980;",
"question": "What is the average horsepower for all cards produced before or in 1980?"
},
{
"type": 3,
"db_id": "car_1",
"query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'tesla';",
"question": "What is the average edispl of the cars of model tesla?"
},
{
"type": 3,
"db_id": "car_1",
"query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'tesla';",
"question": "What is the average edispl for all teslas?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;",
"question": "What is the maximum accelerate for different number of cylinders?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;",
"question": "What is the maximum accelerate for all the different cylinders?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;",
"question": "Which model has the most version(make) of cars?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;",
"question": "What model has the most different versions?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4;",
"question": "How many cars have more than 4 cylinders?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4;",
"question": "What is the number of cars with more than 4 cylinders?"
},
{
"type": 2,
"db_id": "car_1",
"query": "SELECT count(*) FROM CARS_DATA WHERE YEAR >= 2019;",
"question": "how many cars were produced in the last two years?"
},
{
"type": 2,
"db_id": "car_1",
"query": "SELECT count(*) FROM CARS_DATA WHERE YEAR >= 2019;",
"question": "In the last two years, how many cars were made?"
},
{
"type": 3,
"db_id": "car_1",
"query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';",
"question": "How many car models were produced by American Motor?"
},
{
"type": 3,
"db_id": "car_1",
"query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';",
"question": "What is the number of car models created by American Motor?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "Which makers designed more than 3 car models? List full name and the id."
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What are the names and ids of all makers with more than 3 models?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "What are the different models created by either the car maker General Motors or weighed more than 3500?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT DISTINCT T1.Year FROM CARS_DATA AS T1 WHERE T1.Weight > 3000 AND T1.weight < 4000;",
"question": "In which years cars were produced weighing no less than 3000 and no more than 4000?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT DISTINCT T1.Year FROM CARS_DATA AS T1 WHERE T1.Weight > 3000 AND T1.weight < 4000;",
"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?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;",
"question": "What is the horsepower of the car with the largest accelerate?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;",
"question": "What is the horsepower of the car with the greatest accelerate?"
},
{
"type": 3,
"db_id": "car_1",
"query": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'tesla' ORDER BY T1.accelerate ASC LIMIT 1;",
"question": "For model tesla, how many cylinders does the car with the least accelerate have?"
},
{
"type": 3,
"db_id": "car_1",
"query": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'tesla' ORDER BY T1.accelerate ASC LIMIT 1;",
"question": "For a tesla model, how many cylinders does the version with least accelerate have?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );",
"question": "How many cars have a larger accelerate than the car with the largest horsepower?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );",
"question": "What is the number of cars with a greater accelerate than the one with the most horsepower?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 2 );",
"question": "How many countries has more than 2 car makers?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 2 );",
"question": "What is the number of countries with more than 2 car makers?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;",
"question": "How many cars has over 6 cylinders?"
},
{
"type": 0,
"db_id": "car_1",
"query": "SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;",
"question": "What is the number of carsw ith over 6 cylinders?"
},
{
"type": 0,
"db_id": "car_1",
"query": "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;",
"question": "For the cars with 4 cylinders, which model has the largest horsepower?"
},
{
"type": 0,
"db_id": "car_1",