db_id
stringclasses 69
values | question
stringlengths 24
325
| evidence
stringlengths 0
673
| SQL
stringlengths 23
804
| db_schema_T
stringlengths 79
5k
| db_schema
stringclasses 69
values | difficulty
stringclasses 1
value | question_id
int64 0
9.43k
| __index_level_0__
int64 0
9.43k
| db_schema_TC
stringlengths 41
1.68k
| sql_constructs
listlengths 2
17
| sql_complexity
int64 2
46
| sql_complexity_buckets
stringclasses 3
values | few_shots
dict |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
soccer_2016
|
How many players were born in 1970?
|
born in 1970 refers to DOB like '1970%';
|
SELECT COUNT(Player_Name) FROM Player WHERE DOB LIKE '1970%'
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,001 | 2,001 |
CREATE TABLE `Player`
(
Player_Name TEXT,
DOB DATE
)
|
[
"COUNT",
"LIKE",
"SELECT",
"FROM"
] | 4 |
simple
|
{
"case_1": [
2,
259
],
"case_2": [
2,
259
],
"case_3": [
2,
212,
225,
229,
252,
259,
314,
349,
383,
509,
547,
548,
564,
654,
688,
714,
743,
778,
787,
943,
951,
979,
1037,
1064,
1078,
1087,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
6,
9,
11,
13,
15,
16,
20,
22,
25,
26,
27,
28,
30,
32,
35,
36,
37,
38,
40,
47,
51,
53,
55,
57,
59,
61,
62,
63,
67,
68,
69,
73,
74,
75,
77,
78,
81,
82,
86,
87,
88,
89,
90,
91,
93,
96,
98,
106,
108,
109,
113,
114,
115,
117,
118,
119,
121,
124,
125,
126,
127,
131,
136,
140,
142,
143,
146,
147,
148,
152,
157,
159,
160,
164,
167,
168,
169,
170,
173,
175,
179,
182,
183,
184,
185,
187,
188,
189,
190,
191,
192,
196,
197,
198,
199,
202,
203,
204,
206,
210,
212,
214,
216,
224,
225,
226,
227,
229,
230,
233,
234,
240,
243,
244,
247,
252,
254,
256,
258,
259,
261,
263,
264,
267,
268,
269,
271,
273,
276,
277,
286,
291,
293,
294,
299,
301,
303,
311,
314,
315,
316,
317,
319,
320,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
348,
349,
352,
354,
356,
358,
359,
360,
364,
370,
371,
373,
374,
375,
377,
380,
382,
383,
384,
391,
392,
394,
397,
399,
401,
402,
403,
406,
407,
409,
410,
411,
412,
415,
416,
417,
420,
421,
423,
424,
426,
430,
433,
436,
438,
443,
444,
445,
447,
448,
452,
453,
454,
458,
460,
462,
464,
465,
466,
467,
469,
471,
473,
476,
477,
478,
481,
484,
485,
487,
488,
490,
493,
500,
504,
505,
509,
510,
512,
515,
516,
517,
519,
520,
525,
526,
531,
532,
535,
536,
537,
538,
542,
543,
544,
545,
546,
547,
548,
552,
554,
557,
558,
559,
560,
563,
564,
566,
573,
580,
581,
582,
585,
591,
594,
595,
596,
597,
598,
603,
606,
608,
611,
613,
618,
620,
624,
627,
629,
630,
632,
633,
634,
641,
645,
646,
649,
654,
656,
658,
659,
661,
662,
663,
664,
665,
666,
667,
668,
669,
671,
673,
675,
680,
681,
687,
688,
689,
692,
694,
696,
698,
703,
705,
707,
712,
714,
718,
719,
721,
727,
730,
733,
734,
735,
736,
737,
738,
739,
740,
743,
747,
748,
749,
750,
752,
753,
754,
756,
757,
760,
762,
768,
769,
770,
772,
774,
778,
779,
787,
790,
795,
796,
797,
798,
799,
800,
802,
804,
811,
812,
813,
814,
817,
818,
819,
820,
821,
824,
827,
828,
830,
831,
832,
838,
839,
841,
843,
844,
849,
850,
851,
853,
857,
858,
865,
866,
867,
869,
870,
874,
875,
876,
877,
879,
886,
888,
890,
893,
894,
896,
897,
898,
899,
901,
902,
903,
907,
909,
911,
912,
913,
915,
917,
918,
922,
923,
924,
926,
927,
930,
934,
935,
941,
942,
943,
944,
945,
948,
950,
951,
954,
956,
958,
960,
961,
963,
965,
968,
969,
972,
975,
976,
977,
979,
980,
981,
983,
985,
986,
993,
996,
1000,
1005,
1006,
1008,
1010,
1011,
1013,
1014,
1015,
1018,
1019,
1020,
1022,
1023,
1030,
1037,
1042,
1043,
1047,
1050,
1051,
1053,
1054,
1055,
1057,
1058,
1059,
1062,
1064,
1067,
1069,
1070,
1071,
1072,
1076,
1077,
1078,
1079,
1082,
1084,
1086,
1087,
1090,
1094,
1096,
1098,
1100,
1101,
1103,
1104,
1106,
1111,
1112,
1113,
1117,
1119,
1121,
1123,
1124,
1126,
1127,
1128,
1131,
1133,
1134,
1135,
1137
]
}
|
soccer_2016
|
How many players were born in the 80s and have bowling skill of 2?
|
born in the 80s refers to DOB like '198%'; have bowling skill of 2 refers to Bowling_skill = 2;
|
SELECT COUNT(Player_Name) FROM Player WHERE DOB LIKE '198%' AND Bowling_skill = 2
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,002 | 2,002 |
CREATE TABLE `Player`
(
Player_Name TEXT,
DOB DATE,
Bowling_skill INTEGER,
foreign key Bowling_skill references Bowling_StyleBowling_Id
)
|
[
"AND",
"SELECT",
"LIKE",
"COUNT",
"FROM"
] | 5 |
simple
|
{
"case_1": [
2,
43,
259
],
"case_2": [
2,
43,
259
],
"case_3": [
2,
43,
212,
225,
229,
252,
259,
314,
349,
383,
509,
547,
548,
564,
654,
688,
714,
743,
778,
787,
829,
943,
951,
979,
1037,
1064,
1078,
1087,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
8,
9,
10,
11,
12,
13,
15,
16,
19,
20,
21,
22,
24,
25,
26,
27,
28,
30,
32,
33,
35,
36,
37,
38,
39,
40,
43,
44,
45,
47,
50,
51,
52,
53,
55,
56,
57,
59,
61,
62,
63,
66,
67,
68,
69,
71,
73,
74,
75,
76,
77,
78,
79,
81,
82,
85,
86,
87,
88,
89,
90,
91,
93,
95,
96,
98,
99,
100,
106,
108,
109,
111,
112,
113,
114,
115,
116,
117,
118,
119,
121,
124,
125,
126,
127,
128,
129,
131,
136,
138,
140,
141,
142,
143,
144,
146,
147,
148,
152,
154,
157,
158,
159,
160,
163,
164,
167,
168,
169,
170,
172,
173,
175,
176,
177,
179,
180,
182,
183,
184,
185,
187,
188,
189,
190,
191,
192,
196,
197,
198,
199,
200,
202,
203,
204,
206,
210,
212,
214,
216,
219,
223,
224,
225,
226,
227,
229,
230,
233,
234,
239,
240,
243,
244,
247,
252,
254,
255,
256,
258,
259,
261,
262,
263,
264,
265,
266,
267,
268,
269,
270,
271,
272,
273,
275,
276,
277,
278,
282,
286,
291,
293,
294,
296,
299,
301,
303,
305,
311,
314,
315,
316,
317,
319,
320,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
348,
349,
350,
352,
354,
356,
358,
359,
360,
361,
362,
364,
367,
368,
370,
371,
373,
374,
375,
376,
377,
380,
382,
383,
384,
385,
391,
392,
393,
394,
395,
397,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
410,
411,
412,
413,
414,
415,
416,
417,
418,
419,
420,
421,
423,
424,
425,
426,
427,
428,
430,
433,
436,
437,
438,
439,
440,
443,
444,
445,
446,
447,
448,
451,
452,
453,
454,
455,
458,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
473,
475,
476,
477,
478,
480,
481,
482,
484,
485,
487,
488,
490,
492,
493,
494,
496,
497,
498,
500,
504,
505,
507,
509,
510,
512,
514,
515,
516,
517,
519,
520,
522,
524,
525,
526,
528,
529,
530,
531,
532,
533,
535,
536,
537,
538,
539,
541,
542,
543,
544,
545,
546,
547,
548,
551,
552,
554,
557,
558,
559,
560,
561,
562,
563,
564,
566,
573,
580,
581,
582,
584,
585,
586,
588,
589,
591,
594,
595,
596,
597,
598,
599,
601,
603,
605,
606,
608,
610,
611,
612,
613,
615,
618,
620,
622,
624,
625,
626,
627,
629,
630,
632,
633,
634,
637,
641,
643,
645,
646,
648,
649,
651,
654,
656,
658,
659,
661,
662,
663,
664,
665,
666,
667,
668,
669,
671,
673,
675,
677,
678,
679,
680,
681,
683,
684,
685,
686,
687,
688,
689,
690,
692,
693,
694,
696,
697,
698,
699,
702,
703,
705,
707,
712,
714,
715,
716,
718,
719,
721,
726,
727,
730,
733,
734,
735,
736,
737,
738,
739,
740,
741,
743,
746,
747,
748,
749,
750,
752,
753,
754,
756,
757,
758,
760,
762,
763,
765,
767,
768,
769,
770,
772,
773,
774,
775,
776,
777,
778,
779,
780,
783,
785,
787,
788,
790,
793,
794,
795,
796,
797,
798,
799,
800,
802,
804,
806,
807,
808,
810,
811,
812,
813,
814,
817,
818,
819,
820,
821,
824,
825,
827,
828,
829,
830,
831,
832,
835,
838,
839,
840,
841,
843,
844,
848,
849,
850,
851,
853,
855,
857,
858,
859,
860,
861,
864,
865,
866,
867,
869,
870,
873,
874,
875,
876,
877,
878,
879,
886,
888,
890,
892,
893,
894,
895,
896,
897,
898,
899,
901,
902,
903,
905,
907,
909,
911,
912,
913,
915,
917,
918,
920,
922,
923,
924,
926,
927,
928,
930,
931,
932,
934,
935,
941,
942,
943,
944,
945,
948,
949,
950,
951,
953,
954,
956,
958,
960,
961,
963,
965,
968,
969,
972,
974,
975,
976,
977,
979,
980,
981,
983,
985,
986,
991,
993,
996,
998,
1000,
1001,
1005,
1006,
1008,
1009,
1010,
1011,
1013,
1014,
1015,
1017,
1018,
1019,
1020,
1022,
1023,
1027,
1030,
1031,
1037,
1039,
1042,
1043,
1044,
1046,
1047,
1050,
1051,
1053,
1054,
1055,
1057,
1058,
1059,
1061,
1062,
1063,
1064,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1084,
1086,
1087,
1090,
1092,
1094,
1096,
1098,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1115,
1117,
1119,
1121,
1123,
1124,
1126,
1127,
1128,
1131,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
How many matches are there in April, 2008?
|
in April, 2008 refers to Match_date like '2008-04%'
|
SELECT COUNT(Match_Id) FROM Match WHERE Match_date LIKE '2008-04%'
|
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,003 | 2,003 |
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Match_Date DATE
)
|
[
"SELECT",
"LIKE",
"-",
"COUNT",
"FROM"
] | 5 |
simple
|
{
"case_1": [
979
],
"case_2": [
979
],
"case_3": [
2,
43,
212,
225,
229,
252,
259,
314,
349,
383,
509,
547,
548,
550,
564,
617,
654,
688,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1037,
1064,
1078,
1087,
1092,
1093,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
6,
9,
11,
13,
15,
16,
20,
21,
22,
25,
26,
27,
28,
30,
32,
34,
35,
36,
37,
38,
39,
40,
42,
43,
45,
47,
51,
53,
55,
57,
59,
61,
62,
63,
67,
68,
69,
73,
74,
75,
77,
78,
79,
81,
82,
85,
86,
87,
88,
89,
90,
91,
93,
96,
97,
98,
105,
106,
108,
109,
112,
113,
114,
115,
117,
118,
119,
121,
124,
125,
126,
127,
128,
131,
135,
136,
140,
141,
142,
143,
146,
147,
148,
152,
154,
157,
158,
159,
160,
164,
167,
168,
169,
170,
172,
173,
175,
179,
180,
182,
183,
184,
185,
187,
188,
189,
190,
191,
192,
196,
197,
198,
199,
202,
203,
204,
206,
210,
212,
214,
216,
224,
225,
226,
227,
228,
229,
230,
233,
234,
240,
243,
244,
247,
252,
253,
254,
256,
258,
259,
261,
263,
264,
267,
268,
269,
271,
272,
273,
276,
277,
286,
291,
293,
294,
296,
299,
300,
301,
303,
311,
314,
315,
316,
317,
319,
320,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
348,
349,
352,
354,
356,
358,
359,
360,
362,
364,
368,
370,
371,
373,
374,
375,
377,
380,
382,
383,
384,
391,
392,
393,
394,
396,
397,
399,
401,
402,
403,
406,
407,
409,
410,
411,
412,
415,
416,
417,
420,
421,
423,
424,
425,
426,
430,
433,
436,
438,
443,
444,
445,
446,
447,
448,
452,
453,
454,
458,
460,
462,
464,
465,
466,
467,
469,
471,
473,
476,
477,
478,
481,
484,
485,
487,
488,
489,
490,
493,
496,
498,
500,
503,
504,
505,
507,
509,
510,
512,
514,
515,
516,
517,
519,
520,
522,
525,
526,
529,
531,
532,
535,
536,
537,
538,
542,
543,
544,
545,
546,
547,
548,
550,
552,
554,
557,
558,
559,
560,
562,
563,
564,
566,
573,
580,
581,
582,
585,
591,
594,
595,
596,
597,
598,
601,
603,
606,
608,
611,
613,
617,
618,
620,
624,
627,
629,
630,
632,
633,
634,
641,
643,
645,
646,
647,
649,
654,
656,
658,
659,
660,
661,
662,
663,
664,
665,
666,
667,
668,
669,
671,
673,
675,
677,
679,
680,
681,
684,
687,
688,
689,
692,
693,
694,
695,
696,
698,
703,
705,
707,
709,
712,
714,
718,
719,
721,
727,
729,
730,
733,
734,
735,
736,
737,
738,
739,
740,
743,
746,
747,
748,
749,
750,
752,
753,
754,
756,
757,
758,
760,
762,
768,
769,
770,
772,
774,
777,
778,
779,
785,
787,
788,
790,
795,
796,
797,
798,
799,
800,
802,
804,
805,
811,
812,
813,
814,
817,
818,
819,
820,
821,
824,
826,
827,
828,
829,
830,
831,
832,
835,
838,
839,
841,
843,
844,
849,
850,
851,
853,
857,
858,
864,
865,
866,
867,
869,
870,
874,
875,
876,
877,
878,
879,
882,
886,
888,
890,
893,
894,
896,
897,
898,
899,
901,
902,
903,
905,
907,
909,
911,
912,
913,
915,
917,
918,
922,
923,
924,
925,
926,
927,
930,
934,
935,
941,
942,
943,
944,
945,
948,
950,
951,
954,
955,
956,
958,
959,
960,
961,
963,
965,
968,
969,
972,
974,
975,
976,
977,
979,
980,
981,
983,
985,
986,
993,
996,
1000,
1005,
1006,
1008,
1010,
1011,
1013,
1014,
1015,
1018,
1019,
1020,
1022,
1023,
1030,
1031,
1037,
1042,
1043,
1047,
1050,
1051,
1052,
1053,
1054,
1055,
1057,
1058,
1059,
1062,
1064,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1076,
1077,
1078,
1079,
1082,
1084,
1086,
1087,
1090,
1092,
1093,
1094,
1096,
1098,
1100,
1101,
1103,
1104,
1106,
1111,
1112,
1113,
1117,
1119,
1121,
1123,
1124,
1126,
1127,
1128,
1131,
1132,
1133,
1134,
1135,
1137
]
}
|
soccer_2016
|
What is the city name of country ID 3?
|
SELECT City_Name FROM City WHERE Country_ID = 3
|
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,004 | 2,004 |
CREATE TABLE `City`
(
City_Name TEXT,
Country_id INTEGER
)
|
[
"SELECT",
"FROM"
] | 2 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
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,
1001,
1002,
1003,
1004,
1005,
1006,
1007,
1008,
1009,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1018,
1019,
1020,
1021,
1022,
1023,
1024,
1025,
1026,
1027,
1028,
1029,
1030,
1031,
1032,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1040,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1053,
1054,
1055,
1056,
1057,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1074,
1075,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1083,
1084,
1085,
1086,
1087,
1088,
1089,
1090,
1091,
1092,
1093,
1094,
1095,
1096,
1097,
1098,
1099,
1100,
1101,
1102,
1103,
1104,
1105,
1106,
1107,
1108,
1109,
1110,
1111,
1112,
1113,
1114,
1115,
1116,
1117,
1118,
1119,
1120,
1121,
1122,
1123,
1124,
1125,
1126,
1127,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1138,
1139,
1140,
1141
]
}
|
|
soccer_2016
|
How many victory matches were there in 2008?
|
in 2008 refers to Match_Date like '2008%'
|
SELECT COUNT(Match_Id) FROM Match WHERE Match_Date LIKE '2008%' AND Match_Winner IS NOT NULL
|
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,005 | 2,005 |
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Match_Date DATE,
Match_Winner INTEGER,
foreign key Match_Winner references TeamTeam_Id
)
|
[
"AND",
"SELECT",
"LIKE",
"NULL",
"NOT",
"COUNT",
"IS",
"FROM"
] | 8 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
150,
743,
1064
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
53,
67,
92,
126,
131,
138,
146,
148,
150,
152,
158,
171,
184,
195,
258,
263,
267,
277,
294,
298,
303,
305,
341,
395,
398,
402,
403,
406,
421,
436,
443,
444,
476,
479,
493,
508,
516,
522,
528,
533,
589,
591,
601,
629,
637,
672,
706,
712,
724,
740,
743,
749,
756,
800,
804,
805,
837,
844,
870,
880,
894,
917,
924,
927,
930,
935,
941,
965,
978,
982,
985,
1014,
1020,
1022,
1036,
1042,
1048,
1059,
1064,
1066,
1069,
1101,
1128,
1129,
1131
]
}
|
soccer_2016
|
Provide the country ID of East London.
|
East London refers to City_Name = 'East London'
|
SELECT Country_id FROM City WHERE City_Name = 'East London'
|
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,006 | 2,006 |
CREATE TABLE `City`
(
City_Name TEXT,
Country_id INTEGER
)
|
[
"SELECT",
"FROM"
] | 2 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
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,
1001,
1002,
1003,
1004,
1005,
1006,
1007,
1008,
1009,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1018,
1019,
1020,
1021,
1022,
1023,
1024,
1025,
1026,
1027,
1028,
1029,
1030,
1031,
1032,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1040,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1053,
1054,
1055,
1056,
1057,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1074,
1075,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1083,
1084,
1085,
1086,
1087,
1088,
1089,
1090,
1091,
1092,
1093,
1094,
1095,
1096,
1097,
1098,
1099,
1100,
1101,
1102,
1103,
1104,
1105,
1106,
1107,
1108,
1109,
1110,
1111,
1112,
1113,
1114,
1115,
1116,
1117,
1118,
1119,
1120,
1121,
1122,
1123,
1124,
1125,
1126,
1127,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1138,
1139,
1140,
1141
]
}
|
soccer_2016
|
How old is SC Ganguly in 2008?
|
SC Ganguly refers to Player_Name = 'SC Ganguly'; old refers to SUBTRACT(2008, strftime('%Y',DOB))
|
SELECT 2008 - strftime('%Y', DOB) FROM Player WHERE Player_Name = 'SC Ganguly'
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,007 | 2,007 |
CREATE TABLE `Player`
(
Player_Name TEXT,
DOB DATE
)
|
[
"strftime",
"SELECT",
"FROM"
] | 3 |
simple
|
{
"case_1": [
2,
43,
259,
617,
1093
],
"case_2": [
2,
43,
259,
617,
1093
],
"case_3": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
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,
1001,
1002,
1003,
1004,
1005,
1006,
1007,
1008,
1009,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1018,
1019,
1020,
1021,
1022,
1023,
1024,
1025,
1026,
1027,
1028,
1029,
1030,
1031,
1032,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1040,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1053,
1054,
1055,
1056,
1057,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1074,
1075,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1083,
1084,
1085,
1086,
1087,
1088,
1089,
1090,
1091,
1092,
1093,
1094,
1095,
1096,
1097,
1098,
1099,
1100,
1101,
1102,
1103,
1104,
1105,
1106,
1107,
1108,
1109,
1110,
1111,
1112,
1113,
1114,
1115,
1116,
1117,
1118,
1119,
1120,
1121,
1122,
1123,
1124,
1125,
1126,
1127,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1138,
1139,
1140,
1141
]
}
|
soccer_2016
|
List the names of players who play by the left hand.
|
play by the left hand refers to Batting_hand = 'Left-hand bat'
|
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T2.Batting_hand = 'Left-hand bat'
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,008 | 2,008 |
CREATE TABLE `Batting_Style`
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE `Player`
(
Player_Name TEXT,
Batting_hand INTEGER,
foreign key Batting_hand references Batting_StyleBatting_Id
)
|
[
"AS",
"SELECT",
"-",
"INNER JOIN",
"ON",
"FROM"
] | 7 |
simple
|
{
"case_1": [
550
],
"case_2": [
550,
943,
959,
1078
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
How many players are Indians?
|
are Indians refers to Country_Name = 'India'
|
SELECT COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE T2.Country_Name = 'India'
|
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,009 | 2,009 |
CREATE TABLE `Country`
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key Country_Id references CountryCountry_Id
)
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Country_Name INTEGER,
foreign key Country_Name references CountryCountry_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 7 |
simple
|
{
"case_1": [
-1
],
"case_2": [
150,
349
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
List the name of England players.
|
England players refers to Country_Name = 'England'
|
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE T2.Country_Name = 'England'
|
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,010 | 2,010 |
CREATE TABLE `Country`
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key Country_Id references CountryCountry_Id
)
CREATE TABLE `Player`
(
Player_Name TEXT,
Country_Name INTEGER,
foreign key Country_Name references CountryCountry_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 6 |
simple
|
{
"case_1": [
-1
],
"case_2": [
150,
349
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
506,
507,
508,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
653,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
781,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
978,
980,
981,
982,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1075,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What is the venue name of Bandladore?
|
Bandladore refers to City_Name = 'Bangalore'
|
SELECT T1.Venue_Name FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_ID = T2.City_ID WHERE T2.City_Name = 'Bangalore'
|
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,011 | 2,011 |
CREATE TABLE `City`
(
City_Id INTEGER
primary key,
City_Name TEXT
)
CREATE TABLE `Venue`
(
Venue_Name TEXT,
City_Id INTEGER,
foreign key City_Id references CityCity_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 6 |
simple
|
{
"case_1": [
700
],
"case_2": [
548,
700
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
506,
507,
508,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
653,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
781,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
978,
980,
981,
982,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1075,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What are the names of players who participated in season year 2008?
|
season year 2008 refers to Season_Year = 2008
|
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T4.Season_Year = 2008 GROUP BY T1.Player_Name
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,012 | 2,012 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT
)
CREATE TABLE `Season`
(
Season_Id INTEGER
primary key,
Season_Year INTEGER
)
CREATE TABLE `Match`
(
Season_Id INTEGER,
Man_of_the_Match INTEGER,
foreign key Season_Id references SeasonSeason_Id,
foreign key Man_of_the_Match references PlayerPlayer_Id
)
CREATE TABLE `Player_Match`
(
Player_Id INTEGER, Player_Id,
foreign key Player_Id references PlayerPlayer_Id
)
|
[
"GROUP BY",
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 13 |
medium
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What are the names of players that have run scored less than 3?
|
scored less than 3 refers to Runs_Scored < 3; name of player refers to Player_name;
|
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Batsman_Scored AS T3 ON T2.Match_ID = T3.Match_ID WHERE T3.Runs_Scored < 3 GROUP BY T1.Player_Name
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,013 | 2,013 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT
)
CREATE TABLE `Batsman_Scored`
(
Match_Id INTEGER,
Runs_Scored INTEGER,
primary key Match_Id,
foreign key Match_Id references MatchMatch_Id
)
CREATE TABLE `Player_Match`
(
Match_Id INTEGER,
Player_Id INTEGER,
primary key Match_Id, Player_Id,
foreign key Match_Id references MatchMatch_Id,
foreign key Player_Id references PlayerPlayer_Id
)
|
[
"GROUP BY",
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 10 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What is the role of SC Ganguly?
|
SC Ganguly refers to Player_Name = 'SC Ganguly'; role refers to Role_Desc
|
SELECT T3.Role_Desc FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T2.Role_Id = T3.Role_Id WHERE T1.Player_Name = 'SC Ganguly' GROUP BY T3.Role_Desc
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,014 | 2,014 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT
)
CREATE TABLE `Rolee`
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE `Player_Match`
(
Player_Id INTEGER,
Role_Id INTEGER, Player_Id, Role_Id,
foreign key Player_Id references PlayerPlayer_Id,
foreign key Role_Id references RoleeRole_Id
)
|
[
"GROUP BY",
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 10 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
List the names of players who played as a keeper.
|
played as a keeper refers to Role_Desc = 'Keeper'; name of player refers to Player_Name;
|
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T2.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Keeper' GROUP BY T1.Player_Name
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,015 | 2,015 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT
)
CREATE TABLE `Rolee`
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE `Player_Match`
(
Player_Id INTEGER,
Role_Id INTEGER, Player_Id, Role_Id,
foreign key Player_Id references PlayerPlayer_Id,
foreign key Role_Id references RoleeRole_Id
)
|
[
"GROUP BY",
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 10 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What are the names of players in team 1?
|
in team 1 refers to Team_Id = 1; name of player refers to Player_Name;
|
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Team AS T3 ON T2.Team_Id = T3.Team_Id WHERE T3.Team_Id = 1 GROUP BY T1.Player_Name
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,016 | 2,016 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT
)
CREATE TABLE `Team`
(
Team_Id INTEGER
primary key
)
CREATE TABLE `Player_Match`
(
Player_Id INTEGER,
Team_Id INTEGER, Player_Id,
foreign key Player_Id references PlayerPlayer_Id,
foreign key Team_Id references TeamTeam_Id
)
|
[
"GROUP BY",
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 10 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
How many players played as a captain in season year 2008?
|
played as a captain refers to Role_Desc = 'Captain'; in season year 2008 refers Match_Date like '2008%'
|
SELECT COUNT(T1.Player_Id) FROM Player_Match AS T1 INNER JOIN Match AS T2 ON T1.Match_Id = T2.Match_Id INNER JOIN Rolee AS T3 ON T1.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Captain' AND T2.Match_Date LIKE '2008%'
|
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,017 | 2,017 |
CREATE TABLE `Rolee`
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Match_Date DATE
)
CREATE TABLE `Player_Match`
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
primary key Match_Id, Player_Id, Role_Id,
foreign key Match_Id references MatchMatch_Id,
foreign key Player_Id references PlayerPlayer_Id,
foreign key Role_Id references RoleeRole_Id
)
|
[
"AS",
"AND",
"SELECT",
"LIKE",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 12 |
medium
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
Which teams did SC Ganguly join in season year 2008?
|
SC Ganguly refers to Player_Name = 'SC Ganguly'; in season year 2008 refers to Season_Year = 2008
|
SELECT T5.Team_Name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id INNER JOIN Team AS T5 ON T3.Team_Id = T5.Team_Id WHERE T4.Season_Year = 2008 AND T1.Player_Name = 'SC Ganguly' GROUP BY T5.Team_Name
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,018 | 2,018 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT
)
CREATE TABLE `Season`
(
Season_Id INTEGER
primary key,
Season_Year INTEGER
)
CREATE TABLE `Team`
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE `Match`
(
Season_Id INTEGER,
Man_of_the_Match INTEGER,
foreign key Season_Id references SeasonSeason_Id,
foreign key Man_of_the_Match references PlayerPlayer_Id
)
CREATE TABLE `Player_Match`
(
Player_Id INTEGER,
Team_Id INTEGER, Player_Id,
foreign key Player_Id references PlayerPlayer_Id,
foreign key Team_Id references TeamTeam_Id
)
|
[
"GROUP BY",
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 17 |
challenging
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
551,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
718,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What type did match ID 336000 win?
|
type of match won refers to Win_Type
|
SELECT T2.Win_Type FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id WHERE T1.Match_Id = 336000
|
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,019 | 2,019 |
CREATE TABLE `Win_By`
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Win_Type INTEGER,
foreign key Win_Type references Win_ByWin_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 6 |
simple
|
{
"case_1": [
518,
577
],
"case_2": [
518,
564,
577
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
506,
507,
508,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
653,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
781,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
978,
980,
981,
982,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1075,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
Where did SB Joshi come from?
|
SB Joshi refers to Player_Name = 'SB Joshi'; where the player come from refers to Country_Name
|
SELECT T2.Country_Name FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE T1.Player_Name = 'SB Joshi'
|
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,020 | 2,020 |
CREATE TABLE `Country`
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key Country_Id references CountryCountry_Id
)
CREATE TABLE `Player`
(
Player_Name TEXT,
Country_Name INTEGER,
foreign key Country_Name references CountryCountry_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 6 |
simple
|
{
"case_1": [
-1
],
"case_2": [
150,
349
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
506,
507,
508,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
653,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
781,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
978,
980,
981,
982,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1075,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
How many players have left arm fast in bowling skill?
|
have left arm fast in bowling skill refers to Bowling_skill = 'Left-arm fast';
|
SELECT COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_skill = 'Left-arm fast'
|
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,021 | 2,021 |
CREATE TABLE `Bowling_Style`
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Bowling_skill INTEGER,
foreign key Bowling_skill references Bowling_StyleBowling_Id
)
|
[
"AS",
"SELECT",
"-",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 8 |
simple
|
{
"case_1": [
509,
644
],
"case_2": [
509,
644,
1037
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
259,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
737,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
770,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What is the outcome type of match ID 392195?
|
SELECT T2.Outcome_Type FROM Match AS T1 INNER JOIN Outcome AS T2 ON T1.Outcome_type = T2.Outcome_Id WHERE T1.Match_Id = '392195'
|
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,022 | 2,022 |
CREATE TABLE `Outcome`
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Outcome_type INTEGER,
foreign key Outcome_type references Out_TypeOut_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 6 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
506,
507,
508,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
653,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
781,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
978,
980,
981,
982,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1075,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
|
soccer_2016
|
Who is the youngest player and which city did he/she come from?
|
youngest player refers to MIN(DOB); city refers to City_Name
|
SELECT T3.City_Name FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id INNER JOIN City AS T3 ON T2.Country_Id = T3.Country_Id ORDER BY T1.DOB LIMIT 1
|
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,023 | 2,023 |
CREATE TABLE `City`
(
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE `Country`
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key Country_Id references CountryCountry_Id
)
CREATE TABLE `Player`
(
DOB DATE,
Country_Name INTEGER,
foreign key Country_Name references CountryCountry_Id
)
|
[
"AS",
"SELECT",
"ORDER BY",
"LIMIT",
"INNER JOIN",
"ON",
"FROM"
] | 11 |
medium
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
252,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
26,
27,
28,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
108,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
174,
175,
176,
177,
178,
179,
180,
181,
183,
184,
185,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
208,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
252,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
285,
286,
287,
289,
290,
291,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
337,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
352,
353,
354,
356,
357,
358,
359,
360,
361,
363,
364,
365,
368,
369,
370,
371,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
534,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
576,
577,
578,
579,
580,
581,
582,
583,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
619,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
664,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
708,
710,
711,
712,
713,
714,
715,
717,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
732,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
748,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
836,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
869,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
946,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
972,
973,
974,
975,
977,
980,
981,
983,
985,
986,
987,
988,
989,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1024,
1025,
1027,
1029,
1030,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1075,
1076,
1077,
1078,
1080,
1082,
1083,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1139,
1141
]
}
|
soccer_2016
|
How many matches did team Kings XI Punjab win in season year 2008?
|
in season year 2008 refers to Season_Year = 2008; team Kings XI Punjab refers to Team_Name = 'Kings XI Punjab'
|
SELECT COUNT(DISTINCT T2.Match_Id) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T1.Team_Name = 'Kings XI Punjab' AND T4.Season_Year = 2008
|
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,024 | 2,024 |
CREATE TABLE `Season`
(
Season_Id INTEGER
primary key,
Season_Year INTEGER
)
CREATE TABLE `Team`
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Season_Id INTEGER,
Match_Winner INTEGER,
foreign key Season_Id references SeasonSeason_Id,
foreign key Match_Winner references TeamTeam_Id
)
CREATE TABLE `Player_Match`
(
Match_Id INTEGER,
Team_Id INTEGER,
primary key Match_Id,
foreign key Match_Id references MatchMatch_Id,
foreign key Team_Id references TeamTeam_Id
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 14 |
medium
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
35,
36,
37,
39,
40,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
109,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
230,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
259,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
294,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
512,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
554,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
594,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
618,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
656,
657,
658,
659,
660,
661,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
680,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
692,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
707,
710,
711,
712,
714,
715,
717,
718,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
730,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
820,
822,
823,
824,
825,
827,
828,
829,
830,
831,
832,
833,
834,
835,
837,
838,
839,
841,
843,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
903,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
945,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
965,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1019,
1020,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1079,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1126,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
How many seasons did Pune Warriors participate in?
|
Pune Warriors refers to Team_Name = 'Pune Warriors'
|
SELECT COUNT(T.Season_Year) FROM ( SELECT T4.Season_Year FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T1.Team_Name = 'Pune Warriors' GROUP BY T4.Season_Year ) T
|
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,025 | 2,025 |
CREATE TABLE `Season`
(
Season_Id INTEGER
primary key,
Season_Year INTEGER
)
CREATE TABLE `Team`
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE `Match`
(
Season_Id INTEGER,
Match_Winner INTEGER,
foreign key Season_Id references SeasonSeason_Id,
foreign key Match_Winner references TeamTeam_Id
)
CREATE TABLE `Player_Match`
(
Team_Id INTEGER,
foreign key Team_Id references TeamTeam_Id
)
|
[
"GROUP BY",
"AS",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 16 |
challenging
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
252,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
13,
14,
15,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
28,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
108,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
175,
176,
177,
178,
179,
180,
182,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
252,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
352,
353,
354,
356,
357,
358,
359,
360,
361,
363,
364,
365,
368,
369,
370,
371,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
481,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
661,
662,
663,
664,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
710,
711,
712,
714,
715,
717,
718,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
748,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
869,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
972,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1030,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1076,
1077,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What year was R Dravid born and the role he played?
|
R Dravid refers to Player_Name = 'R Dravid'; year born refers to DOB; role refers to Role_Desc
|
SELECT T1.DOB, T3.Role_Desc FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T2.Role_Id = T3.Role_Id WHERE T1.Player_Name = 'R Dravid' GROUP BY T1.DOB, T3.Role_Desc
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,026 | 2,026 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE
)
CREATE TABLE `Rolee`
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE `Player_Match`
(
Player_Id INTEGER,
Role_Id INTEGER, Player_Id, Role_Id,
foreign key Player_Id references PlayerPlayer_Id,
foreign key Role_Id references RoleeRole_Id
)
|
[
"GROUP BY",
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 10 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
How many times did SC Ganguly be the man of the match?
|
SC Ganguly refers to Player_Name = 'SC Ganguly'
|
SELECT COUNT(T2.Man_of_the_Match) FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id WHERE T1.Player_Name = 'SC Ganguly'
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,027 | 2,027 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT
)
CREATE TABLE `Match`
(
Man_of_the_Match INTEGER,
foreign key Man_of_the_Match references PlayerPlayer_Id
)
CREATE TABLE `Player_Match`
(
Player_Id INTEGER, Player_Id,
foreign key Player_Id references PlayerPlayer_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 10 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
How many matches did team Mumbai Indians win in 2008?
|
team Mumbai Indians refers to Team_Name = 'Mumbai Indians'; in 2008 refers to Match_Date like '2008%'
|
SELECT COUNT(T.Match_Id) FROM ( SELECT T2.Match_Id FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id WHERE T1.Team_Name = 'Mumbai Indians' AND T2.Match_Date LIKE '2008%' GROUP BY T2.Match_Id ) T
|
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,028 | 2,028 |
CREATE TABLE `Team`
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Match_Date DATE,
Match_Winner INTEGER,
foreign key Match_Winner references TeamTeam_Id
)
CREATE TABLE `Player_Match`
(
Match_Id INTEGER,
Team_Id INTEGER,
primary key Match_Id,
foreign key Match_Id references MatchMatch_Id,
foreign key Team_Id references TeamTeam_Id
)
|
[
"GROUP BY",
"AS",
"AND",
"SELECT",
"LIKE",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 15 |
medium
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
718,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
Which team won by wickets in match ID 335993?
|
team refers to Team_Name
|
SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Win_By AS T4 ON T2.Win_Type = T4.Win_Id WHERE T2.Match_Id = '335993' GROUP BY T1.Team_Name
|
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,029 | 2,029 |
CREATE TABLE `Team`
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE `Win_By`
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Win_Type INTEGER,
Match_Winner INTEGER,
foreign key Win_Type references Win_ByWin_Id,
foreign key Match_Winner references TeamTeam_Id
)
CREATE TABLE `Player_Match`
(
Match_Id INTEGER,
Team_Id INTEGER,
primary key Match_Id,
foreign key Match_Id references MatchMatch_Id,
foreign key Team_Id references TeamTeam_Id
)
|
[
"GROUP BY",
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 13 |
medium
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
Count the matches that were won by wickets in all season.
|
won by wickets refers to Win_type = 'wickets';
|
SELECT COUNT(T1.Match_Id) FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id WHERE T2.Win_type = 'wickets'
|
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,030 | 2,030 |
CREATE TABLE `Win_By`
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Win_Type INTEGER,
foreign key Win_Type references Win_ByWin_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 7 |
simple
|
{
"case_1": [
518,
577
],
"case_2": [
518,
564,
577
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What is the role of W Jaffer in season year 2012?
|
W Jaffer refers to Player_name = 'W Jaffer'; in season year 2012 refers to Season_Year = 2012; role refers to Role_Desc
|
SELECT T4.Role_Desc FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Match AS T3 ON T2.Match_Id = T3.Match_Id INNER JOIN Rolee AS T4 ON T2.Role_Id = T4.Role_Id INNER JOIN Season AS T5 ON T3.Season_Id = T5.Season_Id WHERE T1.Player_name = 'W Jaffer' AND T5.Season_Year = 2012
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,031 | 2,031 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT
)
CREATE TABLE `Rolee`
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE `Season`
(
Season_Id INTEGER
primary key,
Season_Year INTEGER
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Season_Id INTEGER,
foreign key Season_Id references SeasonSeason_Id
)
CREATE TABLE `Player_Match`
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
primary key Match_Id, Player_Id, Role_Id,
foreign key Match_Id references MatchMatch_Id,
foreign key Player_Id references PlayerPlayer_Id,
foreign key Role_Id references RoleeRole_Id
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 16 |
challenging
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What are the names of players who had been man of the match more than 5 times in season year 2008?
|
man of the match more than 5 times refers to COUNT(Man_of_the_Match) > 5; in season year 2008 refers to Season_Year = 2008; name of player refers to Player_Name;
|
SELECT CASE WHEN COUNT(T2.Man_of_the_Match) > 5 THEN T1.Player_Name ELSE 0 END FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T4.Season_Year = 2008
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,032 | 2,032 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT
)
CREATE TABLE `Season`
(
Season_Id INTEGER
primary key,
Season_Year INTEGER
)
CREATE TABLE `Match`
(
Season_Id INTEGER,
Man_of_the_Match INTEGER,
foreign key Season_Id references SeasonSeason_Id,
foreign key Man_of_the_Match references PlayerPlayer_Id
)
CREATE TABLE `Player_Match`
(
Player_Id INTEGER, Player_Id,
foreign key Player_Id references PlayerPlayer_Id
)
|
[
"CASE WHEN",
"AS",
"SELECT",
"CASE",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 15 |
medium
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
175,
176,
177,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
508,
509,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
What is the average of Indian players that were born between 1975 and 1985 among all players?
|
Indian players refers to Country_Name = 'India'; born between 1975 and 1985 refers to strftime('%Y',T1.DOB) between '1975' and '1985'; average refers to DIVIDE(COUNT(Country_Name = 'India'), COUNT(Player_Id))
|
SELECT CAST(SUM(CASE WHEN T2.Country_Name = 'India' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE strftime('%Y', T1.DOB) BETWEEN '1975' AND '1985'
|
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,033 | 2,033 |
CREATE TABLE `Country`
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key Country_Id references CountryCountry_Id
)
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
DOB DATE,
Country_Name INTEGER,
foreign key Country_Name references CountryCountry_Id
)
|
[
"CASE WHEN",
"AS",
"AND",
"SELECT",
"SUM",
"strftime",
"CASE",
"INNER JOIN",
"ON",
"CAST",
"COUNT",
"BETWEEN",
"FROM"
] | 15 |
medium
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
201,
212,
225,
314,
383,
518,
547,
550,
564,
640,
714,
743,
787,
943,
959,
1064,
1078,
1087,
1092,
1098
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
4,
6,
16,
22,
24,
30,
37,
39,
42,
47,
51,
53,
61,
63,
64,
68,
69,
71,
73,
74,
75,
76,
77,
81,
85,
88,
93,
96,
98,
106,
112,
113,
115,
117,
118,
119,
120,
125,
127,
129,
131,
141,
142,
143,
146,
148,
152,
153,
155,
158,
160,
164,
169,
170,
173,
175,
183,
184,
187,
189,
191,
192,
195,
197,
201,
207,
212,
214,
215,
219,
223,
225,
226,
227,
234,
236,
244,
248,
254,
256,
258,
261,
264,
267,
268,
271,
276,
277,
278,
279,
296,
299,
300,
301,
304,
314,
316,
317,
319,
322,
323,
325,
330,
335,
339,
341,
347,
356,
360,
370,
374,
375,
382,
383,
391,
393,
398,
402,
403,
406,
409,
412,
414,
415,
416,
417,
423,
424,
426,
427,
433,
436,
438,
444,
448,
451,
452,
453,
458,
463,
464,
469,
470,
476,
477,
478,
482,
483,
485,
486,
487,
488,
490,
493,
500,
504,
510,
514,
515,
516,
517,
518,
519,
520,
526,
528,
530,
535,
537,
540,
544,
547,
550,
558,
559,
560,
562,
563,
564,
571,
573,
575,
580,
581,
582,
595,
597,
608,
612,
613,
620,
623,
627,
628,
630,
632,
633,
640,
641,
646,
658,
662,
663,
666,
668,
671,
676,
677,
681,
682,
683,
686,
687,
690,
710,
712,
714,
723,
727,
734,
735,
739,
740,
743,
744,
747,
749,
750,
753,
756,
760,
762,
767,
768,
772,
776,
777,
787,
788,
795,
796,
797,
798,
799,
800,
802,
804,
808,
810,
813,
814,
819,
824,
825,
827,
830,
832,
838,
841,
844,
848,
849,
851,
853,
867,
868,
870,
871,
874,
877,
886,
888,
894,
896,
898,
902,
909,
912,
917,
922,
923,
924,
926,
930,
935,
943,
944,
954,
956,
958,
959,
961,
969,
985,
986,
996,
998,
1008,
1012,
1022,
1023,
1027,
1031,
1042,
1058,
1062,
1064,
1067,
1068,
1069,
1071,
1072,
1078,
1082,
1084,
1086,
1087,
1092,
1098,
1100,
1101,
1103,
1104,
1119,
1121,
1123,
1128,
1131,
1133,
1134,
1135
]
}
|
soccer_2016
|
Calculate the percentage of left hand batting style players among all players.
|
left hand batting style players refers to Batting_hand = 'Left-hand bat'; percentage refers to DIVIDE(COUNT(Batting_hand = 'Left-hand bat'), COUNT(Player_Id)) * 100.0
|
SELECT CAST(SUM(CASE WHEN T2.Batting_hand = 'Left-hand bat' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,034 | 2,034 |
CREATE TABLE `Batting_Style`
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Batting_hand INTEGER,
foreign key Batting_hand references Batting_StyleBatting_Id
)
|
[
"CASE WHEN",
"AS",
"SELECT",
"SUM",
"CASE",
"-",
"INNER JOIN",
"ON",
"CAST",
"COUNT",
"FROM"
] | 13 |
medium
|
{
"case_1": [
943,
1078
],
"case_2": [
550,
943,
959,
1078
],
"case_3": [
201,
212,
225,
229,
314,
349,
383,
509,
518,
547,
548,
550,
564,
640,
654,
688,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1037,
1064,
1078,
1087,
1092,
1093,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
6,
11,
16,
21,
22,
24,
27,
30,
34,
35,
36,
37,
39,
42,
45,
47,
51,
53,
55,
61,
62,
63,
64,
68,
69,
71,
73,
74,
75,
77,
81,
82,
83,
85,
86,
87,
88,
91,
93,
94,
96,
97,
98,
104,
105,
106,
112,
113,
115,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
131,
135,
140,
141,
142,
143,
146,
148,
152,
153,
154,
155,
158,
159,
160,
164,
167,
169,
170,
171,
172,
173,
175,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
195,
196,
197,
199,
201,
202,
206,
207,
212,
213,
214,
215,
219,
223,
225,
226,
227,
228,
229,
233,
234,
236,
240,
243,
244,
247,
248,
254,
256,
258,
261,
264,
267,
268,
269,
271,
272,
276,
277,
278,
279,
296,
298,
299,
300,
301,
304,
311,
313,
314,
316,
317,
319,
320,
322,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
347,
349,
354,
356,
358,
360,
363,
364,
365,
368,
370,
373,
374,
375,
378,
379,
381,
382,
383,
384,
391,
392,
393,
394,
398,
401,
402,
403,
406,
409,
411,
412,
415,
416,
417,
423,
424,
425,
426,
427,
436,
438,
444,
445,
446,
448,
450,
451,
452,
453,
454,
458,
460,
462,
464,
465,
467,
469,
470,
471,
473,
476,
477,
478,
479,
483,
484,
485,
486,
487,
488,
489,
490,
493,
496,
498,
500,
503,
504,
505,
507,
509,
510,
514,
515,
516,
517,
518,
519,
520,
522,
526,
528,
529,
532,
535,
536,
537,
538,
540,
544,
547,
548,
550,
552,
558,
559,
560,
562,
563,
564,
566,
571,
573,
575,
579,
580,
581,
582,
595,
596,
597,
606,
608,
609,
611,
612,
613,
620,
623,
624,
627,
628,
630,
632,
633,
634,
638,
640,
641,
643,
645,
646,
647,
649,
650,
654,
658,
659,
660,
662,
663,
665,
666,
668,
669,
671,
672,
675,
676,
677,
681,
682,
684,
686,
687,
688,
690,
693,
694,
695,
696,
701,
705,
706,
709,
710,
712,
714,
717,
721,
723,
727,
733,
734,
735,
736,
739,
740,
743,
744,
745,
746,
747,
749,
750,
752,
753,
754,
756,
758,
760,
762,
768,
769,
772,
776,
777,
778,
779,
787,
788,
790,
795,
796,
797,
798,
799,
800,
802,
804,
805,
808,
810,
812,
813,
814,
818,
819,
823,
824,
825,
827,
829,
830,
832,
835,
838,
839,
841,
844,
848,
849,
851,
853,
857,
858,
866,
867,
868,
870,
871,
874,
876,
877,
878,
880,
882,
886,
888,
893,
894,
896,
897,
898,
901,
902,
905,
909,
911,
912,
913,
915,
917,
918,
922,
923,
924,
925,
926,
927,
930,
934,
935,
941,
943,
944,
950,
951,
954,
956,
958,
959,
961,
962,
963,
969,
973,
974,
975,
977,
979,
980,
981,
985,
986,
993,
996,
998,
1005,
1006,
1008,
1010,
1012,
1013,
1015,
1022,
1023,
1027,
1031,
1037,
1038,
1042,
1043,
1047,
1050,
1051,
1052,
1058,
1062,
1064,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1082,
1084,
1086,
1087,
1092,
1093,
1094,
1098,
1100,
1101,
1103,
1104,
1106,
1111,
1112,
1119,
1121,
1123,
1124,
1128,
1131,
1132,
1133,
1134,
1135,
1137
]
}
|
soccer_2016
|
What is the percentage of matches that are won by runs?
|
won by runs refers to win_type = 1; percentage refers to DIVIDE(COUNT(win_type = 1), COUNT(Win_Type)) * 100
|
SELECT CAST(SUM(CASE WHEN T1.win_type = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Win_Type) FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id
|
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,035 | 2,035 |
CREATE TABLE `Win_By`
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE `Match`
(
Win_Type INTEGER,
foreign key Win_Type references Win_ByWin_Id
)
|
[
"CASE WHEN",
"AS",
"SELECT",
"SUM",
"CASE",
"INNER JOIN",
"ON",
"CAST",
"COUNT",
"FROM"
] | 12 |
medium
|
{
"case_1": [
564
],
"case_2": [
518,
564
],
"case_3": [
201,
212,
225,
229,
314,
349,
383,
509,
518,
547,
548,
550,
564,
640,
654,
688,
714,
743,
778,
787,
943,
951,
959,
1037,
1064,
1078,
1087,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
4,
6,
11,
16,
22,
24,
27,
30,
35,
36,
37,
39,
42,
47,
51,
53,
55,
61,
62,
63,
64,
68,
69,
71,
73,
74,
75,
77,
81,
82,
83,
86,
87,
88,
91,
93,
94,
96,
98,
104,
106,
112,
113,
115,
117,
118,
119,
120,
121,
125,
126,
127,
129,
131,
140,
141,
142,
143,
146,
148,
152,
153,
155,
158,
159,
160,
164,
167,
169,
170,
171,
173,
175,
179,
183,
184,
186,
187,
188,
189,
190,
191,
192,
195,
196,
197,
199,
201,
202,
206,
207,
212,
213,
214,
215,
219,
223,
225,
226,
227,
228,
229,
233,
234,
236,
243,
244,
247,
248,
254,
256,
258,
261,
264,
267,
268,
269,
271,
276,
277,
278,
279,
298,
299,
300,
301,
304,
311,
313,
314,
316,
317,
319,
320,
322,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
347,
349,
354,
356,
358,
360,
363,
364,
365,
370,
373,
374,
375,
378,
379,
381,
382,
383,
384,
391,
392,
393,
394,
398,
401,
402,
403,
406,
409,
411,
412,
415,
416,
417,
423,
424,
426,
427,
436,
438,
444,
445,
448,
450,
451,
452,
453,
454,
458,
460,
462,
464,
465,
467,
469,
470,
471,
473,
476,
477,
478,
479,
483,
484,
485,
486,
487,
488,
490,
493,
500,
504,
505,
509,
510,
514,
515,
516,
517,
518,
519,
520,
526,
528,
532,
535,
536,
537,
538,
540,
544,
547,
548,
550,
552,
558,
559,
560,
563,
564,
566,
571,
573,
575,
579,
580,
581,
582,
595,
596,
597,
606,
608,
609,
611,
612,
613,
620,
623,
627,
628,
630,
632,
633,
634,
638,
640,
641,
645,
646,
649,
650,
654,
658,
659,
662,
663,
665,
666,
668,
669,
671,
672,
676,
681,
682,
686,
687,
688,
690,
694,
695,
696,
701,
705,
706,
710,
712,
714,
717,
721,
723,
727,
733,
734,
735,
736,
739,
740,
743,
744,
745,
747,
749,
750,
752,
753,
756,
760,
762,
768,
769,
772,
776,
777,
778,
779,
787,
788,
790,
795,
796,
797,
798,
799,
800,
802,
804,
805,
808,
810,
812,
813,
814,
818,
819,
823,
824,
825,
827,
830,
832,
838,
839,
841,
844,
848,
849,
851,
853,
857,
866,
867,
868,
870,
871,
874,
876,
877,
880,
886,
888,
893,
894,
896,
897,
898,
901,
902,
909,
911,
912,
913,
915,
917,
918,
922,
923,
924,
926,
927,
930,
934,
935,
941,
943,
944,
950,
951,
954,
956,
958,
959,
961,
962,
963,
969,
973,
975,
977,
981,
985,
986,
993,
996,
998,
1005,
1006,
1008,
1010,
1012,
1013,
1015,
1022,
1023,
1027,
1031,
1037,
1038,
1042,
1043,
1047,
1050,
1051,
1058,
1062,
1064,
1066,
1067,
1068,
1069,
1071,
1072,
1078,
1082,
1084,
1086,
1087,
1092,
1094,
1098,
1100,
1101,
1103,
1104,
1106,
1112,
1119,
1121,
1123,
1124,
1128,
1131,
1133,
1134,
1135,
1137
]
}
|
soccer_2016
|
How many matches have 7 points of winning margin?
|
have 7 points of winning margin refers to win_margin = 7;
|
SELECT COUNT(Match_Id) FROM Match WHERE win_margin = 7
|
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,036 | 2,036 |
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Win_Margin INTEGER
)
|
[
"COUNT",
"SELECT",
"FROM"
] | 3 |
simple
|
{
"case_1": [
122,
979
],
"case_2": [
122,
979
],
"case_3": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
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,
1001,
1002,
1003,
1004,
1005,
1006,
1007,
1008,
1009,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1018,
1019,
1020,
1021,
1022,
1023,
1024,
1025,
1026,
1027,
1028,
1029,
1030,
1031,
1032,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1040,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1053,
1054,
1055,
1056,
1057,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1074,
1075,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1083,
1084,
1085,
1086,
1087,
1088,
1089,
1090,
1091,
1092,
1093,
1094,
1095,
1096,
1097,
1098,
1099,
1100,
1101,
1102,
1103,
1104,
1105,
1106,
1107,
1108,
1109,
1110,
1111,
1112,
1113,
1114,
1115,
1116,
1117,
1118,
1119,
1120,
1121,
1122,
1123,
1124,
1125,
1126,
1127,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1138,
1139,
1140,
1141
]
}
|
soccer_2016
|
What is the total number of players born between 1970 to 1975?
|
born between 1970 to 1975 refers to strftime('%Y',DOB) between '1970' and '1975'
|
SELECT COUNT(Player_Id) FROM Player WHERE strftime('%Y', DOB) BETWEEN '1970' AND '1975'
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,037 | 2,037 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
DOB DATE
)
|
[
"AND",
"SELECT",
"strftime",
"COUNT",
"BETWEEN",
"FROM"
] | 6 |
simple
|
{
"case_1": [
2,
43,
259
],
"case_2": [
2,
43,
259
],
"case_3": [
2,
43,
259,
314,
383,
714,
743,
1064,
1092
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
2,
4,
10,
22,
30,
32,
37,
39,
40,
43,
47,
51,
53,
63,
67,
68,
69,
73,
74,
75,
76,
79,
85,
88,
93,
96,
98,
109,
113,
115,
117,
118,
119,
125,
131,
142,
143,
146,
152,
160,
164,
169,
170,
173,
175,
183,
184,
187,
197,
214,
223,
227,
230,
244,
256,
259,
267,
268,
276,
277,
294,
296,
301,
305,
314,
317,
319,
325,
330,
339,
341,
350,
370,
374,
382,
383,
391,
399,
403,
406,
414,
416,
417,
421,
424,
426,
433,
436,
444,
448,
451,
463,
464,
469,
476,
477,
482,
490,
493,
500,
510,
512,
515,
516,
519,
520,
526,
530,
537,
544,
554,
558,
559,
562,
563,
581,
582,
591,
594,
595,
608,
612,
613,
618,
627,
632,
633,
641,
656,
663,
667,
668,
671,
677,
680,
681,
683,
686,
687,
692,
707,
712,
714,
718,
719,
727,
730,
734,
735,
739,
740,
743,
749,
753,
756,
760,
767,
768,
777,
788,
797,
798,
799,
800,
804,
810,
814,
817,
819,
820,
824,
830,
831,
838,
843,
849,
851,
853,
864,
867,
870,
877,
886,
888,
896,
902,
903,
917,
923,
924,
930,
935,
945,
954,
956,
958,
961,
965,
969,
985,
986,
996,
1008,
1014,
1020,
1022,
1023,
1030,
1031,
1042,
1058,
1059,
1064,
1067,
1071,
1072,
1079,
1081,
1084,
1086,
1092,
1100,
1101,
1103,
1104,
1119,
1121,
1123,
1126,
1128,
1131
]
}
|
soccer_2016
|
Who is the winning team in a match held on April 26, 2009 with a winning margin of 6 points?
|
winning margin of 6 points refers to Win_Margin = 6; held on April 26, 2009 refers to Match_Date = '2009-04-26'
|
SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner WHERE T2.Win_Margin = 6 AND T2.Match_Date = '2009-04-26'
|
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,038 | 2,038 |
CREATE TABLE `Team`
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE `Match`
(
Match_Date DATE,
Win_Margin INTEGER,
Match_Winner INTEGER,
foreign key Match_Winner references TeamTeam_Id
)
|
[
"AS",
"AND",
"SELECT",
"-",
"INNER JOIN",
"ON",
"FROM"
] | 9 |
simple
|
{
"case_1": [
592,
1098
],
"case_2": [
212,
592,
829,
1064,
1087,
1098
],
"case_3": [
2,
43,
134,
150,
201,
212,
225,
229,
232,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
36,
37,
39,
41,
42,
43,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
79,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
259,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
362,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
679,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
785,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
864,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
In the match ID 419135, who won by runs?
|
who refers to Team_Name
|
SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Win_By AS T3 ON T2.win_type = T3.win_id WHERE T2.Match_Id = 419135
|
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,039 | 2,039 |
CREATE TABLE `Team`
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE `Win_By`
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Win_Type INTEGER,
Match_Winner INTEGER,
foreign key Win_Type references Win_ByWin_Id,
foreign key Match_Winner references TeamTeam_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 9 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
506,
507,
508,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
653,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
781,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
978,
980,
981,
982,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1075,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
Among the matches held in St. George's Park, give the match ID of the match with the highest winning margin points.
|
held in St. George's Park refers to Venue_Name = 'St George''s Park'; highest winning margin points refers to MAX(Win_Margin)
|
SELECT T2.Match_Id FROM Venue AS T1 INNER JOIN Match AS T2 ON T1.venue_id = T2.venue_id WHERE T1.Venue_Name = 'St George''s Park' ORDER BY T2.Win_Margin DESC LIMIT 1
|
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,040 | 2,040 |
CREATE TABLE `Venue`
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Venue_Id INTEGER,
Win_Margin INTEGER,
foreign key Venue_Id references VenueVenue_Id
)
|
[
"AS",
"SELECT",
"ORDER BY",
"LIMIT",
"INNER JOIN",
"ON",
"DESC",
"FROM"
] | 9 |
simple
|
{
"case_1": [
-1
],
"case_2": [
688,
1092
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
252,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
26,
27,
28,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
108,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
174,
175,
176,
177,
179,
180,
181,
183,
184,
185,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
208,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
252,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
285,
286,
287,
289,
290,
291,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
337,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
352,
353,
354,
356,
357,
358,
359,
360,
361,
363,
364,
365,
368,
369,
370,
371,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
534,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
576,
577,
578,
579,
580,
581,
582,
583,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
619,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
664,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
708,
710,
711,
712,
714,
715,
717,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
732,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
748,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
836,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
869,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
943,
944,
946,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
972,
973,
974,
975,
977,
980,
981,
983,
985,
986,
987,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1010,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1030,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1076,
1077,
1078,
1080,
1082,
1083,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1139,
1141
]
}
|
soccer_2016
|
How many of the players are from Sri Lanka?
|
from Sri Lanka refers to Country_Name = 'Sri Lanka';
|
SELECT COUNT(*) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE T2.Country_Name = 'Sri Lanka'
|
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,041 | 2,041 |
CREATE TABLE `Country`
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key Country_Id references CountryCountry_Id
)
CREATE TABLE `Player`
(
Country_Name INTEGER,
foreign key Country_Name references CountryCountry_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 7 |
simple
|
{
"case_1": [
-1
],
"case_2": [
150,
349
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
List the player's name who played as a captain.
|
played as a captain refers to Role_Desc = 'captain'; player refers to Player_Name
|
SELECT T2.Player_Name FROM Player_Match AS T1 INNER JOIN Player AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T1.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Captain' GROUP BY T2.Player_Name
|
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,042 | 2,042 |
CREATE TABLE `Player`
(
Player_Id INTEGER
primary key,
Player_Name TEXT
)
CREATE TABLE `Rolee`
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE `Player_Match`
(
Player_Id INTEGER,
Role_Id INTEGER, Player_Id, Role_Id,
foreign key Player_Id references PlayerPlayer_Id,
foreign key Role_Id references RoleeRole_Id
)
|
[
"GROUP BY",
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 10 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
Give the match's venue and winning team for the match ID 392194.
|
venue refers to Venue_Name; winning team refers to match_winner
|
SELECT T1.Venue_Name, T3.Team_Name FROM Venue AS T1 INNER JOIN Match AS T2 ON T1.venue_id = T2.venue_id INNER JOIN Team AS T3 ON T2.match_winner = T3.Team_Id WHERE T2.Match_Id = 392194
|
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,043 | 2,043 |
CREATE TABLE `Team`
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE `Venue`
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT
)
CREATE TABLE `Match`
(
Match_Id INTEGER
primary key,
Venue_Id INTEGER,
Match_Winner INTEGER,
foreign key Venue_Id references VenueVenue_Id,
foreign key Match_Winner references TeamTeam_Id
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 9 |
simple
|
{
"case_1": [
-1
],
"case_2": [
778
],
"case_3": [
2,
134,
150,
201,
212,
225,
229,
232,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
640,
644,
654,
688,
700,
714,
743,
778,
787,
829,
943,
951,
959,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
506,
507,
508,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
653,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
781,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
978,
980,
981,
982,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1075,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
soccer_2016
|
Among the matches of Delhi Daredevils in 2009, what is the percentage of their matches won by wickets?
|
Delhi Daredevils refers to team_name = 'Delhi Daredevils'; in 2009 refers to Match_Date = '2009%'; won by wickets refers to Win_Type = 'wickets'; percentage refers to DIVIDE(COUNT(Win_Type = 'wickets'), COUNT(Win_Type))
|
SELECT CAST(SUM(CASE WHEN T3.Win_Type = 'wickets' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.Win_Type) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner INNER JOIN Win_By AS T3 ON T2.Win_Type = T3.Win_Id WHERE T1.Team_Name = 'Delhi Daredevils'
|
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
|
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
Country_id INTEGER
)
CREATE TABLE Country
(
Country_Id INTEGER
primary key,
Country_Name TEXT,
foreign key (Country_Id) references Country(Country_Id)
)
CREATE TABLE Extra_Type
(
Extra_Id INTEGER
primary key,
Extra_Name TEXT
)
CREATE TABLE Extra_Runs
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Extra_Type_Id INTEGER,
Extra_Runs INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Extra_Type_Id) references Extra_Type(Extra_Id)
)
CREATE TABLE Out_Type
(
Out_Id INTEGER
primary key,
Out_Name TEXT
)
CREATE TABLE Outcome
(
Outcome_Id INTEGER
primary key,
Outcome_Type TEXT
)
CREATE TABLE Player
(
Player_Id INTEGER
primary key,
Player_Name TEXT,
DOB DATE,
Batting_hand INTEGER,
Bowling_skill INTEGER,
Country_Name INTEGER,
foreign key (Batting_hand) references Batting_Style(Batting_Id),
foreign key (Bowling_skill) references Bowling_Style(Bowling_Id),
foreign key (Country_Name) references Country(Country_Id)
)
CREATE TABLE Rolee
(
Role_Id INTEGER
primary key,
Role_Desc TEXT
)
CREATE TABLE Season
(
Season_Id INTEGER
primary key,
Man_of_the_Series INTEGER,
Orange_Cap INTEGER,
Purple_Cap INTEGER,
Season_Year INTEGER
)
CREATE TABLE Team
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE Toss_Decision
(
Toss_Id INTEGER
primary key,
Toss_Name TEXT
)
CREATE TABLE Umpire
(
Umpire_Id INTEGER
primary key,
Umpire_Name TEXT,
Umpire_Country INTEGER,
foreign key (Umpire_Country) references Country(Country_Id)
)
CREATE TABLE Venue
(
Venue_Id INTEGER
primary key,
Venue_Name TEXT,
City_Id INTEGER,
foreign key (City_Id) references City(City_Id)
)
CREATE TABLE Win_By
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE Match
(
Match_Id INTEGER
primary key,
Team_1 INTEGER,
Team_2 INTEGER,
Match_Date DATE,
Season_Id INTEGER,
Venue_Id INTEGER,
Toss_Winner INTEGER,
Toss_Decide INTEGER,
Win_Type INTEGER,
Win_Margin INTEGER,
Outcome_type INTEGER,
Match_Winner INTEGER,
Man_of_the_Match INTEGER,
foreign key (Team_1) references Team(Team_Id),
foreign key (Team_2) references Team(Team_Id),
foreign key (Season_Id) references Season(Season_Id),
foreign key (Venue_Id) references Venue(Venue_Id),
foreign key (Toss_Winner) references Team(Team_Id),
foreign key (Toss_Decide) references Toss_Decision(Toss_Id),
foreign key (Win_Type) references Win_By(Win_Id),
foreign key (Outcome_type) references Out_Type(Out_Id),
foreign key (Match_Winner) references Team(Team_Id),
foreign key (Man_of_the_Match) references Player(Player_Id)
)
CREATE TABLE Ball_by_Ball
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Innings_No INTEGER,
Team_Batting INTEGER,
Team_Bowling INTEGER,
Striker_Batting_Position INTEGER,
Striker INTEGER,
Non_Striker INTEGER,
Bowler INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Batsman_Scored
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Runs_Scored INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id)
)
CREATE TABLE Player_Match
(
Match_Id INTEGER,
Player_Id INTEGER,
Role_Id INTEGER,
Team_Id INTEGER,
primary key (Match_Id, Player_Id, Role_Id),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Id) references Player(Player_Id),
foreign key (Team_Id) references Team(Team_Id),
foreign key (Role_Id) references Rolee(Role_Id)
)
CREATE TABLE Wicket_Taken
(
Match_Id INTEGER,
Over_Id INTEGER,
Ball_Id INTEGER,
Player_Out INTEGER,
Kind_Out INTEGER,
Fielders INTEGER,
Innings_No INTEGER,
primary key (Match_Id, Over_Id, Ball_Id, Innings_No),
foreign key (Match_Id) references Match(Match_Id),
foreign key (Player_Out) references Player(Player_Id),
foreign key (Kind_Out) references Out_Type(Out_Id),
foreign key (Fielders) references Player(Player_Id)
)
|
na
| 2,044 | 2,044 |
CREATE TABLE `Team`
(
Team_Id INTEGER
primary key,
Team_Name TEXT
)
CREATE TABLE `Win_By`
(
Win_Id INTEGER
primary key,
Win_Type TEXT
)
CREATE TABLE `Match`
(
Win_Type INTEGER,
Match_Winner INTEGER,
foreign key Win_Type references Win_ByWin_Id,
foreign key Match_Winner references TeamTeam_Id
)
|
[
"CASE WHEN",
"AS",
"SELECT",
"SUM",
"CASE",
"INNER JOIN",
"ON",
"CAST",
"COUNT",
"FROM"
] | 15 |
medium
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
201,
212,
225,
229,
314,
349,
383,
509,
518,
547,
548,
550,
564,
640,
654,
688,
714,
743,
778,
787,
943,
951,
959,
1037,
1064,
1078,
1087,
1092,
1098,
1124
],
"case_4": [
2,
43,
54,
122,
134,
150,
201,
205,
212,
225,
229,
232,
245,
252,
259,
314,
349,
383,
509,
518,
547,
548,
550,
564,
577,
592,
617,
640,
644,
654,
688,
700,
713,
714,
743,
778,
787,
829,
943,
951,
959,
979,
1024,
1037,
1064,
1065,
1078,
1087,
1091,
1092,
1093,
1098,
1102,
1110,
1124
],
"case_5": [
0,
1,
4,
6,
11,
16,
22,
24,
27,
30,
35,
36,
37,
39,
42,
47,
51,
53,
55,
61,
62,
63,
64,
68,
69,
71,
73,
74,
75,
77,
81,
82,
83,
86,
87,
88,
91,
93,
94,
96,
98,
104,
106,
112,
113,
115,
117,
118,
119,
120,
121,
125,
126,
127,
129,
131,
140,
141,
142,
143,
146,
148,
152,
153,
155,
158,
159,
160,
164,
167,
169,
170,
171,
173,
175,
179,
183,
184,
186,
187,
188,
189,
190,
191,
192,
195,
196,
197,
199,
201,
202,
206,
207,
212,
213,
214,
215,
219,
223,
225,
226,
227,
228,
229,
233,
234,
236,
243,
244,
247,
248,
254,
256,
258,
261,
264,
267,
268,
269,
271,
276,
277,
278,
279,
298,
299,
300,
301,
304,
311,
313,
314,
316,
317,
319,
320,
322,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
347,
349,
354,
356,
358,
360,
363,
364,
365,
370,
373,
374,
375,
378,
379,
381,
382,
383,
384,
391,
392,
393,
394,
398,
401,
402,
403,
406,
409,
411,
412,
415,
416,
417,
423,
424,
426,
427,
436,
438,
444,
445,
448,
450,
451,
452,
453,
454,
458,
460,
462,
464,
465,
467,
469,
470,
471,
473,
476,
477,
478,
479,
483,
484,
485,
486,
487,
488,
490,
493,
500,
504,
505,
509,
510,
514,
515,
516,
517,
518,
519,
520,
526,
528,
532,
535,
536,
537,
538,
540,
544,
547,
548,
550,
552,
558,
559,
560,
563,
564,
566,
571,
573,
575,
579,
580,
581,
582,
595,
596,
597,
606,
608,
609,
611,
612,
613,
620,
623,
627,
628,
630,
632,
633,
634,
638,
640,
641,
645,
646,
649,
650,
654,
658,
659,
662,
663,
665,
666,
668,
669,
671,
672,
676,
681,
682,
686,
687,
688,
690,
694,
695,
696,
701,
705,
706,
710,
712,
714,
717,
721,
723,
727,
733,
734,
735,
736,
739,
740,
743,
744,
745,
747,
749,
750,
752,
753,
756,
760,
762,
768,
769,
772,
776,
777,
778,
779,
787,
788,
790,
795,
796,
797,
798,
799,
800,
802,
804,
805,
808,
810,
812,
813,
814,
818,
819,
823,
824,
825,
827,
830,
832,
838,
839,
841,
844,
848,
849,
851,
853,
857,
866,
867,
868,
870,
871,
874,
876,
877,
880,
886,
888,
893,
894,
896,
897,
898,
901,
902,
909,
911,
912,
913,
915,
917,
918,
922,
923,
924,
926,
927,
930,
934,
935,
941,
943,
944,
950,
951,
954,
956,
958,
959,
961,
962,
963,
969,
973,
975,
977,
981,
985,
986,
993,
996,
998,
1005,
1006,
1008,
1010,
1012,
1013,
1015,
1022,
1023,
1027,
1031,
1037,
1038,
1042,
1043,
1047,
1050,
1051,
1058,
1062,
1064,
1066,
1067,
1068,
1069,
1071,
1072,
1078,
1082,
1084,
1086,
1087,
1092,
1094,
1098,
1100,
1101,
1103,
1104,
1106,
1112,
1119,
1121,
1123,
1124,
1128,
1131,
1133,
1134,
1135,
1137
]
}
|
music_tracker
|
What is the release title of the single that was released by Ron Hunt in 1979 that was downloaded 239 times?
|
release title refers to groupName; Ron Hunt is an artist; groupYear = 1979; releaseType = 'single'; downloaded 239 times refer to totalSnatched = 239;
|
SELECT groupName FROM torrents WHERE artist LIKE 'ron hunt & ronnie g & the sm crew' AND groupYear = 1979 AND releaseType LIKE 'single' AND totalSnatched = 239
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,045 | 2,045 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT
)
|
[
"LIKE",
"AND",
"SELECT",
"FROM"
] | 7 |
simple
|
{
"case_1": [
38,
591,
738,
1018,
1117
],
"case_2": [
38,
421,
591,
738,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
2,
3,
4,
5,
8,
10,
12,
19,
20,
21,
22,
24,
26,
30,
32,
33,
37,
38,
39,
40,
43,
44,
45,
47,
50,
51,
52,
53,
56,
57,
59,
63,
66,
67,
68,
69,
71,
73,
74,
75,
76,
79,
81,
82,
85,
88,
90,
93,
95,
96,
98,
99,
100,
109,
111,
112,
113,
114,
115,
116,
117,
118,
119,
125,
126,
127,
128,
129,
131,
136,
138,
141,
142,
143,
144,
146,
152,
154,
158,
160,
163,
164,
168,
169,
170,
172,
175,
176,
177,
179,
180,
183,
184,
187,
197,
200,
202,
204,
212,
214,
219,
223,
227,
230,
239,
240,
244,
247,
255,
256,
258,
259,
262,
263,
264,
265,
266,
267,
268,
270,
272,
275,
276,
277,
278,
282,
294,
296,
301,
305,
314,
315,
317,
319,
325,
330,
339,
341,
348,
350,
356,
361,
362,
367,
368,
370,
373,
374,
376,
377,
382,
383,
385,
391,
393,
395,
397,
398,
399,
402,
403,
405,
406,
407,
408,
413,
414,
415,
416,
417,
418,
419,
421,
424,
425,
426,
427,
428,
430,
433,
436,
437,
438,
439,
440,
444,
446,
448,
451,
452,
455,
463,
464,
469,
470,
475,
476,
477,
480,
482,
490,
492,
493,
494,
496,
497,
498,
500,
507,
510,
512,
514,
515,
516,
519,
520,
522,
524,
525,
526,
528,
529,
530,
532,
533,
537,
539,
541,
544,
546,
551,
554,
557,
558,
559,
561,
562,
563,
581,
582,
584,
586,
588,
589,
591,
594,
595,
598,
599,
601,
605,
608,
610,
612,
613,
615,
618,
622,
624,
625,
626,
627,
629,
632,
633,
637,
641,
643,
648,
651,
656,
663,
666,
667,
668,
671,
675,
677,
678,
679,
680,
683,
684,
685,
686,
687,
690,
692,
693,
697,
699,
702,
707,
712,
714,
715,
716,
718,
719,
726,
727,
730,
734,
735,
738,
739,
740,
741,
743,
746,
747,
749,
753,
754,
756,
758,
760,
763,
765,
767,
768,
773,
774,
775,
776,
777,
780,
783,
785,
787,
788,
793,
794,
796,
797,
798,
799,
800,
804,
806,
807,
808,
810,
814,
817,
819,
820,
824,
825,
828,
829,
830,
831,
832,
835,
838,
840,
841,
843,
844,
848,
849,
850,
851,
853,
855,
858,
859,
860,
861,
864,
865,
867,
870,
873,
875,
877,
878,
879,
886,
888,
892,
895,
896,
902,
903,
905,
907,
909,
917,
918,
920,
922,
923,
924,
928,
930,
931,
932,
935,
944,
945,
948,
949,
953,
954,
956,
958,
961,
965,
969,
974,
979,
980,
985,
986,
991,
996,
998,
1000,
1001,
1008,
1009,
1014,
1017,
1018,
1019,
1020,
1022,
1023,
1027,
1031,
1039,
1042,
1044,
1046,
1054,
1057,
1058,
1059,
1061,
1063,
1064,
1067,
1068,
1070,
1071,
1072,
1073,
1079,
1080,
1081,
1084,
1086,
1092,
1096,
1098,
1100,
1101,
1103,
1104,
1105,
1109,
1111,
1115,
1117,
1119,
1121,
1123,
1126,
1128,
1131,
1136
]
}
|
music_tracker
|
How many times was the album released by blowfly in 1980 downloaded?
|
blowfly is an artist; groupYear = 1980; album refers to releaseType; downloaded refers to totalSnatched;
|
SELECT totalSnatched FROM torrents WHERE artist LIKE 'blowfly' AND groupYear = 1980
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,046 | 2,046 |
CREATE TABLE `torrents`
(
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER
)
|
[
"LIKE",
"AND",
"SELECT",
"FROM"
] | 4 |
simple
|
{
"case_1": [
38,
591,
738,
1018,
1117
],
"case_2": [
38,
421,
591,
738,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
2,
3,
4,
5,
8,
10,
12,
19,
20,
21,
22,
24,
26,
30,
32,
33,
37,
38,
39,
40,
43,
44,
45,
47,
50,
51,
52,
53,
56,
57,
59,
63,
66,
67,
68,
69,
71,
73,
74,
75,
76,
79,
81,
82,
85,
88,
90,
93,
95,
96,
98,
99,
100,
109,
111,
112,
113,
114,
115,
116,
117,
118,
119,
125,
126,
127,
128,
129,
131,
136,
138,
141,
142,
143,
144,
146,
152,
154,
158,
160,
163,
164,
168,
169,
170,
172,
175,
176,
177,
179,
180,
183,
184,
187,
197,
200,
202,
204,
212,
214,
219,
223,
227,
230,
239,
240,
244,
247,
255,
256,
258,
259,
262,
263,
264,
265,
266,
267,
268,
270,
272,
275,
276,
277,
278,
282,
294,
296,
301,
305,
314,
315,
317,
319,
325,
330,
339,
341,
348,
350,
356,
361,
362,
367,
368,
370,
373,
374,
376,
377,
382,
383,
385,
391,
393,
395,
397,
398,
399,
402,
403,
405,
406,
407,
408,
413,
414,
415,
416,
417,
418,
419,
421,
424,
425,
426,
427,
428,
430,
433,
436,
437,
438,
439,
440,
444,
446,
448,
451,
452,
455,
463,
464,
469,
470,
475,
476,
477,
480,
482,
490,
492,
493,
494,
496,
497,
498,
500,
507,
510,
512,
514,
515,
516,
519,
520,
522,
524,
525,
526,
528,
529,
530,
532,
533,
537,
539,
541,
544,
546,
551,
554,
557,
558,
559,
561,
562,
563,
581,
582,
584,
586,
588,
589,
591,
594,
595,
598,
599,
601,
605,
608,
610,
612,
613,
615,
618,
622,
624,
625,
626,
627,
629,
632,
633,
637,
641,
643,
648,
651,
656,
663,
666,
667,
668,
671,
675,
677,
678,
679,
680,
683,
684,
685,
686,
687,
690,
692,
693,
697,
699,
702,
707,
712,
714,
715,
716,
718,
719,
726,
727,
730,
734,
735,
738,
739,
740,
741,
743,
746,
747,
749,
753,
754,
756,
758,
760,
763,
765,
767,
768,
773,
774,
775,
776,
777,
780,
783,
785,
787,
788,
793,
794,
796,
797,
798,
799,
800,
804,
806,
807,
808,
810,
814,
817,
819,
820,
824,
825,
828,
829,
830,
831,
832,
835,
838,
840,
841,
843,
844,
848,
849,
850,
851,
853,
855,
858,
859,
860,
861,
864,
865,
867,
870,
873,
875,
877,
878,
879,
886,
888,
892,
895,
896,
902,
903,
905,
907,
909,
917,
918,
920,
922,
923,
924,
928,
930,
931,
932,
935,
944,
945,
948,
949,
953,
954,
956,
958,
961,
965,
969,
974,
979,
980,
985,
986,
991,
996,
998,
1000,
1001,
1008,
1009,
1014,
1017,
1018,
1019,
1020,
1022,
1023,
1027,
1031,
1039,
1042,
1044,
1046,
1054,
1057,
1058,
1059,
1061,
1063,
1064,
1067,
1068,
1070,
1071,
1072,
1073,
1079,
1080,
1081,
1084,
1086,
1092,
1096,
1098,
1100,
1101,
1103,
1104,
1105,
1109,
1111,
1115,
1117,
1119,
1121,
1123,
1126,
1128,
1131,
1136
]
}
|
music_tracker
|
What is the tag of the album with the highest amount of downloads?
|
album refers to releaseType; the highest amount of downloads refers to MAX(totalSnatched);
|
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'album' ORDER BY T1.totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,047 | 2,047 |
CREATE TABLE `torrents`
(
totalSnatched INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"ORDER BY",
"LIMIT",
"INNER JOIN",
"ON",
"DESC",
"FROM"
] | 9 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
26,
27,
28,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
108,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
174,
175,
176,
177,
179,
180,
181,
183,
184,
185,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
208,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
252,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
285,
286,
287,
289,
290,
291,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
337,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
352,
353,
354,
356,
357,
358,
359,
360,
361,
363,
364,
365,
368,
369,
370,
371,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
534,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
576,
577,
578,
579,
580,
581,
582,
583,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
619,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
664,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
708,
710,
711,
712,
714,
715,
717,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
732,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
748,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
836,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
869,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
943,
944,
946,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
972,
973,
974,
975,
977,
980,
981,
983,
985,
986,
987,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1010,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1030,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1076,
1077,
1078,
1080,
1082,
1083,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1139,
1141
]
}
|
music_tracker
|
What are the top 5 tags with the highest amount of downloads?
|
the highest amount of downloads refers to MAX(totalSnatched);
|
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'album' ORDER BY T1.totalSnatched DESC LIMIT 5
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,048 | 2,048 |
CREATE TABLE `torrents`
(
totalSnatched INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"ORDER BY",
"LIMIT",
"INNER JOIN",
"ON",
"DESC",
"FROM"
] | 9 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
26,
27,
28,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
108,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
174,
175,
176,
177,
179,
180,
181,
183,
184,
185,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
208,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
252,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
285,
286,
287,
289,
290,
291,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
337,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
352,
353,
354,
356,
357,
358,
359,
360,
361,
363,
364,
365,
368,
369,
370,
371,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
534,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
576,
577,
578,
579,
580,
581,
582,
583,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
619,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
664,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
708,
710,
711,
712,
714,
715,
717,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
732,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
748,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
836,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
869,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
943,
944,
946,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
972,
973,
974,
975,
977,
980,
981,
983,
985,
986,
987,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1010,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1030,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1076,
1077,
1078,
1080,
1082,
1083,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1139,
1141
]
}
|
music_tracker
|
What is the release title of the single under the "funk" tag that was released the oldest?
|
release title of single refers to groupName where releaseType = 'single'; the oldest means coming before all others in time and refers to MIN(groupYear);
|
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag LIKE 'funk' AND T1.releaseType = 'single' ORDER BY T1.groupYear LIMIT 1
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,049 | 2,049 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"LIKE",
"LIMIT",
"ORDER BY",
"INNER JOIN",
"ON",
"FROM"
] | 10 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1010,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Name all the release titles of the "ep's" under the alternative tag.
|
release titles of the "ep's" refer to groupName where releaseType = 'ep';
|
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag LIKE 'alternative' AND T1.releaseType = 'ep'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,050 | 2,050 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"LIKE",
"INNER JOIN",
"ON",
"FROM"
] | 8 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
421,
591,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1018,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1117,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
What are the tags of the top 5 least downloaded live albums?
|
least downloaded album refers to MIN(totalSnatched where releaseType = 'album');
|
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'album' ORDER BY T1.totalSnatched LIMIT 5
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,051 | 2,051 |
CREATE TABLE `torrents`
(
totalSnatched INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"ORDER BY",
"LIMIT",
"INNER JOIN",
"ON",
"FROM"
] | 8 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
26,
27,
28,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
108,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
174,
175,
176,
177,
178,
179,
180,
181,
183,
184,
185,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
208,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
252,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
285,
286,
287,
289,
290,
291,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
337,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
352,
353,
354,
356,
357,
358,
359,
360,
361,
363,
364,
365,
368,
369,
370,
371,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
534,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
576,
577,
578,
579,
580,
581,
582,
583,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
619,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
664,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
708,
710,
711,
712,
713,
714,
715,
717,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
732,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
748,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
836,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
869,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
946,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
972,
973,
974,
975,
977,
980,
981,
983,
985,
986,
987,
988,
989,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1024,
1025,
1027,
1029,
1030,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1075,
1076,
1077,
1078,
1080,
1082,
1083,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1139,
1141
]
}
|
music_tracker
|
What is the tag and the artist of the most downloaded single?
|
the most downloaded single refers to MAX(totalSnatched where releaseType = 'single');
|
SELECT T2.tag, T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'single' ORDER BY T1.totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,052 | 2,052 |
CREATE TABLE `torrents`
(
totalSnatched INTEGER,
artist TEXT,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"ORDER BY",
"LIMIT",
"INNER JOIN",
"ON",
"DESC",
"FROM"
] | 9 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
26,
27,
28,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
108,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
174,
175,
176,
177,
179,
180,
181,
183,
184,
185,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
208,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
252,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
285,
286,
287,
289,
290,
291,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
337,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
352,
353,
354,
356,
357,
358,
359,
360,
361,
363,
364,
365,
368,
369,
370,
371,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
534,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
576,
577,
578,
579,
580,
581,
582,
583,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
619,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
664,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
708,
710,
711,
712,
714,
715,
717,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
732,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
748,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
836,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
869,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
943,
944,
946,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
972,
973,
974,
975,
977,
980,
981,
983,
985,
986,
987,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1010,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1030,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1076,
1077,
1078,
1080,
1082,
1083,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1139,
1141
]
}
|
music_tracker
|
How many releases are tagged "1980s"?
|
tag = '1980s';
|
SELECT COUNT(id) FROM tags WHERE tag LIKE '1980s'
|
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,053 | 2,053 |
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"COUNT",
"LIKE",
"SELECT",
"FROM"
] | 4 |
simple
|
{
"case_1": [
598
],
"case_2": [
598
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
6,
9,
11,
13,
15,
16,
20,
22,
25,
26,
27,
28,
30,
32,
35,
36,
37,
38,
40,
47,
51,
53,
55,
57,
59,
61,
62,
63,
67,
68,
69,
73,
74,
75,
77,
78,
81,
82,
86,
87,
88,
89,
90,
91,
93,
96,
98,
106,
108,
109,
113,
114,
115,
117,
118,
119,
121,
124,
125,
126,
127,
131,
136,
140,
142,
143,
146,
147,
148,
152,
157,
159,
160,
164,
167,
168,
169,
170,
173,
175,
179,
182,
183,
184,
185,
187,
188,
189,
190,
191,
192,
196,
197,
198,
199,
202,
203,
204,
206,
210,
212,
214,
216,
224,
225,
226,
227,
229,
230,
233,
234,
240,
243,
244,
247,
252,
254,
256,
258,
259,
261,
263,
264,
267,
268,
269,
271,
273,
276,
277,
286,
291,
293,
294,
299,
301,
303,
311,
314,
315,
316,
317,
319,
320,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
348,
349,
352,
354,
356,
358,
359,
360,
364,
370,
371,
373,
374,
375,
377,
380,
382,
383,
384,
391,
392,
394,
397,
399,
401,
402,
403,
406,
407,
409,
410,
411,
412,
415,
416,
417,
420,
421,
423,
424,
426,
430,
433,
436,
438,
443,
444,
445,
447,
448,
452,
453,
454,
458,
460,
462,
464,
465,
466,
467,
469,
471,
473,
476,
477,
478,
481,
484,
485,
487,
488,
490,
493,
500,
504,
505,
509,
510,
512,
515,
516,
517,
519,
520,
525,
526,
531,
532,
535,
536,
537,
538,
542,
543,
544,
545,
546,
547,
548,
552,
554,
557,
558,
559,
560,
563,
564,
566,
573,
580,
581,
582,
585,
591,
594,
595,
596,
597,
598,
603,
606,
608,
611,
613,
618,
620,
624,
627,
629,
630,
632,
633,
634,
641,
645,
646,
649,
654,
656,
658,
659,
661,
662,
663,
664,
665,
666,
667,
668,
669,
671,
673,
675,
680,
681,
687,
688,
689,
692,
694,
696,
698,
703,
705,
707,
712,
714,
718,
719,
721,
727,
730,
733,
734,
735,
736,
737,
738,
739,
740,
743,
747,
748,
749,
750,
752,
753,
754,
756,
757,
760,
762,
768,
769,
770,
772,
774,
778,
779,
787,
790,
795,
796,
797,
798,
799,
800,
802,
804,
811,
812,
813,
814,
817,
818,
819,
820,
821,
824,
827,
828,
830,
831,
832,
838,
839,
841,
843,
844,
849,
850,
851,
853,
857,
858,
865,
866,
867,
869,
870,
874,
875,
876,
877,
879,
886,
888,
890,
893,
894,
896,
897,
898,
899,
901,
902,
903,
907,
909,
911,
912,
913,
915,
917,
918,
922,
923,
924,
926,
927,
930,
934,
935,
941,
942,
943,
944,
945,
948,
950,
951,
954,
956,
958,
960,
961,
963,
965,
968,
969,
972,
975,
976,
977,
979,
980,
981,
983,
985,
986,
993,
996,
1000,
1005,
1006,
1008,
1010,
1011,
1013,
1014,
1015,
1018,
1019,
1020,
1022,
1023,
1030,
1037,
1042,
1043,
1047,
1050,
1051,
1053,
1054,
1055,
1057,
1058,
1059,
1062,
1064,
1067,
1069,
1070,
1071,
1072,
1076,
1077,
1078,
1079,
1082,
1084,
1086,
1087,
1090,
1094,
1096,
1098,
1100,
1101,
1103,
1104,
1106,
1111,
1112,
1113,
1117,
1119,
1121,
1123,
1124,
1126,
1127,
1128,
1131,
1133,
1134,
1135,
1137
]
}
|
music_tracker
|
How many times has the release "city funk" been downloaded?
|
groupName = 'city funk'; downloaded refers to totalSnatched;
|
SELECT totalSnatched FROM torrents WHERE groupName LIKE 'city funk'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,054 | 2,054 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
totalSnatched INTEGER
)
|
[
"LIKE",
"SELECT",
"FROM"
] | 3 |
simple
|
{
"case_1": [
38,
591,
738,
1018,
1117
],
"case_2": [
38,
421,
591,
738,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
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,
1001,
1002,
1003,
1004,
1005,
1006,
1007,
1008,
1009,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1018,
1019,
1020,
1021,
1022,
1023,
1024,
1025,
1026,
1027,
1028,
1029,
1030,
1031,
1032,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1040,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1053,
1054,
1055,
1056,
1057,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1074,
1075,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1083,
1084,
1085,
1086,
1087,
1088,
1089,
1090,
1091,
1092,
1093,
1094,
1095,
1096,
1097,
1098,
1099,
1100,
1101,
1102,
1103,
1104,
1105,
1106,
1107,
1108,
1109,
1110,
1111,
1112,
1113,
1114,
1115,
1116,
1117,
1118,
1119,
1120,
1121,
1122,
1123,
1124,
1125,
1126,
1127,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1138,
1139,
1140,
1141
]
}
|
music_tracker
|
Please list the releases that have been downloaded for more than 20000 times.
|
releases refer to groupName; downloaded for more than 20000 times refers to totalSnatched > 20000;
|
SELECT groupName FROM torrents WHERE totalSnatched > 20000
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,055 | 2,055 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
totalSnatched INTEGER
)
|
[
"SELECT",
"FROM"
] | 2 |
simple
|
{
"case_1": [
38,
591,
738,
1018,
1117
],
"case_2": [
38,
421,
591,
738,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
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,
1001,
1002,
1003,
1004,
1005,
1006,
1007,
1008,
1009,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1018,
1019,
1020,
1021,
1022,
1023,
1024,
1025,
1026,
1027,
1028,
1029,
1030,
1031,
1032,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1040,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1053,
1054,
1055,
1056,
1057,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1074,
1075,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1083,
1084,
1085,
1086,
1087,
1088,
1089,
1090,
1091,
1092,
1093,
1094,
1095,
1096,
1097,
1098,
1099,
1100,
1101,
1102,
1103,
1104,
1105,
1106,
1107,
1108,
1109,
1110,
1111,
1112,
1113,
1114,
1115,
1116,
1117,
1118,
1119,
1120,
1121,
1122,
1123,
1124,
1125,
1126,
1127,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1138,
1139,
1140,
1141
]
}
|
music_tracker
|
What are the tags of the release "sugarhill gang"?
|
release "sugarhill gang" refers to groupName = 'sugarhill gang';
|
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'sugarhill gang'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,056 | 2,056 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 6 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
506,
507,
508,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
653,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
781,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
978,
980,
981,
982,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1075,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
How many tags does the release "city funk" have?
|
release "city funk" refers to groupName = 'city funk';
|
SELECT COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'city funk'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,057 | 2,057 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 7 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Please list the titles of all the releases with the tag "1980s".
|
titles refer to groupName;
|
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,058 | 2,058 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 6 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
506,
507,
508,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
653,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
781,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
978,
980,
981,
982,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1075,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Among the releases with the tag "1980s", which one of them is the most downloaded? Please give its title.
|
title refers to groupName; the most downloaded refers to MAX(totalSnatched);
|
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s' ORDER BY T1.totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,059 | 2,059 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
totalSnatched INTEGER,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"ORDER BY",
"LIMIT",
"INNER JOIN",
"ON",
"DESC",
"FROM"
] | 9 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
26,
27,
28,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
108,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
174,
175,
176,
177,
179,
180,
181,
183,
184,
185,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
208,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
252,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
285,
286,
287,
289,
290,
291,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
337,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
352,
353,
354,
356,
357,
358,
359,
360,
361,
363,
364,
365,
368,
369,
370,
371,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
534,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
576,
577,
578,
579,
580,
581,
582,
583,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
619,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
664,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
708,
710,
711,
712,
714,
715,
717,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
732,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
748,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
836,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
869,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
943,
944,
946,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
972,
973,
974,
975,
977,
980,
981,
983,
985,
986,
987,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1010,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1030,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1076,
1077,
1078,
1080,
1082,
1083,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1139,
1141
]
}
|
music_tracker
|
How many releases by the artist michael jackson are tagged "pop"?
|
tag = 'pop';
|
SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.artist = 'michael jackson'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,060 | 2,060 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
artist TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 8 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
421,
591,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
35,
36,
37,
39,
40,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
109,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
230,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
259,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
294,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
512,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
554,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
594,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
618,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
656,
657,
658,
659,
660,
661,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
680,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
692,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
707,
710,
711,
712,
714,
715,
717,
718,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
730,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
820,
822,
823,
824,
825,
827,
828,
829,
830,
831,
832,
833,
834,
835,
837,
838,
839,
841,
843,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
903,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
945,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
965,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1019,
1020,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1079,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1126,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Among the releases that were released in 2000, how many of them were released as an album and tagged "pop"?
|
groupYear = 2000; album refers to releaseType;
|
SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.releaseType = 'album' AND T1.groupYear = 2000
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,061 | 2,061 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 9 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
421,
591,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
35,
36,
37,
39,
40,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
109,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
230,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
259,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
294,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
512,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
554,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
594,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
618,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
656,
657,
658,
659,
660,
661,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
680,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
692,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
707,
710,
711,
712,
714,
715,
717,
718,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
730,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
820,
822,
823,
824,
825,
827,
828,
829,
830,
831,
832,
833,
834,
835,
837,
838,
839,
841,
843,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
903,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
945,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
965,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1019,
1020,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1079,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1126,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
What are the average download times for the a release tagged "1980s"?
|
AVG(totalSnatched where tag = '1980s');
|
SELECT CAST(SUM(T1.totalSnatched) AS REAL) / COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,062 | 2,062 |
CREATE TABLE `torrents`
(
totalSnatched INTEGER,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"SUM",
"INNER JOIN",
"ON",
"CAST",
"COUNT",
"FROM"
] | 10 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Name the title of the top three releases with the highest number of downloads.
|
title refers to groupName; the highest number of downloads refers to MAX(totalSnatched);
|
SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 3
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,063 | 2,063 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
totalSnatched INTEGER
)
|
[
"SELECT",
"ORDER BY",
"LIMIT",
"FROM",
"DESC"
] | 5 |
simple
|
{
"case_1": [
38
],
"case_2": [
38
],
"case_3": [
38,
125,
403
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
1,
10,
11,
13,
15,
17,
20,
28,
29,
36,
38,
43,
49,
55,
59,
62,
69,
73,
75,
78,
86,
89,
108,
110,
121,
125,
133,
138,
150,
159,
162,
163,
167,
173,
174,
179,
181,
185,
187,
188,
199,
200,
202,
206,
208,
213,
229,
233,
239,
247,
252,
262,
263,
275,
278,
281,
285,
286,
291,
309,
311,
313,
314,
319,
320,
324,
328,
329,
334,
336,
337,
341,
342,
345,
348,
349,
352,
353,
356,
359,
364,
365,
371,
373,
378,
379,
381,
385,
394,
395,
400,
403,
404,
409,
411,
428,
429,
434,
435,
444,
445,
451,
454,
460,
462,
469,
482,
495,
497,
505,
530,
532,
534,
536,
538,
542,
548,
552,
555,
560,
566,
567,
576,
578,
579,
583,
584,
586,
590,
592,
595,
611,
619,
621,
625,
626,
634,
637,
638,
645,
654,
657,
659,
664,
665,
669,
681,
688,
690,
691,
698,
701,
703,
708,
713,
719,
732,
733,
735,
748,
752,
759,
760,
768,
778,
790,
803,
810,
815,
818,
823,
827,
830,
836,
850,
851,
861,
866,
869,
876,
886,
889,
891,
893,
901,
911,
918,
927,
929,
934,
946,
950,
951,
953,
954,
956,
962,
963,
966,
967,
970,
972,
973,
975,
977,
981,
983,
987,
989,
994,
1004,
1005,
1006,
1010,
1013,
1017,
1024,
1025,
1030,
1034,
1037,
1038,
1047,
1049,
1050,
1051,
1056,
1057,
1065,
1067,
1068,
1075,
1076,
1077,
1083,
1094,
1124,
1137,
1139,
1141
]
}
|
music_tracker
|
Provide the name of the artist who released his or her Single-Table in 2012 with the highest number of downloads. Name the Single-Table title as well.
|
title refers to groupName; the highest number of downloads refers to MAX(totalSnatched where groupYear = 2012 and releaseType = 'single');
|
SELECT artist, groupName FROM torrents WHERE groupYear = 2012 AND releaseType LIKE 'Single' ORDER BY totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,064 | 2,064 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT
)
|
[
"AND",
"SELECT",
"LIKE",
"LIMIT",
"ORDER BY",
"DESC",
"FROM"
] | 7 |
simple
|
{
"case_1": [
38,
591,
1018,
1117
],
"case_2": [
38,
421,
591,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
1,
10,
11,
13,
15,
17,
20,
26,
28,
29,
36,
38,
43,
49,
55,
57,
59,
62,
69,
73,
75,
78,
86,
89,
90,
108,
121,
125,
127,
131,
133,
138,
146,
150,
159,
162,
163,
167,
168,
173,
174,
179,
181,
184,
185,
187,
188,
199,
200,
202,
206,
208,
213,
229,
233,
239,
240,
247,
252,
258,
262,
263,
275,
277,
278,
281,
285,
286,
291,
309,
311,
313,
314,
315,
319,
320,
324,
329,
334,
336,
337,
341,
342,
345,
348,
349,
352,
353,
356,
359,
364,
365,
371,
373,
378,
379,
381,
385,
394,
395,
400,
402,
403,
404,
409,
411,
421,
428,
429,
433,
434,
435,
438,
444,
445,
451,
452,
454,
460,
462,
469,
476,
482,
495,
497,
505,
530,
532,
534,
536,
538,
542,
548,
552,
555,
557,
560,
566,
567,
576,
578,
579,
583,
584,
586,
590,
591,
592,
595,
611,
619,
621,
624,
625,
626,
634,
637,
638,
645,
654,
657,
659,
664,
665,
666,
669,
675,
681,
688,
690,
691,
698,
701,
703,
708,
713,
719,
732,
733,
735,
740,
743,
747,
748,
749,
752,
754,
756,
759,
760,
768,
778,
790,
800,
803,
804,
810,
815,
818,
823,
827,
830,
832,
836,
844,
850,
851,
858,
861,
866,
869,
870,
876,
879,
886,
889,
891,
893,
901,
907,
911,
917,
918,
924,
927,
929,
930,
934,
944,
946,
950,
951,
953,
954,
956,
962,
963,
966,
967,
970,
972,
973,
975,
977,
981,
983,
987,
989,
994,
1000,
1004,
1005,
1006,
1010,
1013,
1017,
1018,
1019,
1022,
1024,
1025,
1030,
1034,
1037,
1038,
1042,
1047,
1049,
1050,
1051,
1056,
1057,
1064,
1065,
1067,
1068,
1076,
1077,
1083,
1094,
1101,
1117,
1124,
1128,
1137,
1139,
1141
]
}
|
music_tracker
|
How many albums and Single-Tables were released by the artist named '50 cent' between 2010 and 2015?
|
albums refer to releaseType = 'album'; releaseType = 'single'; between 2010 and 2015 refers to groupYear between 2010 and 2015;
|
SELECT COUNT(id), ( SELECT COUNT(id) FROM torrents WHERE groupYear BETWEEN 2010 AND 2015 AND artist LIKE '50 cent' AND releaseType LIKE 'album' ) FROM torrents WHERE groupYear BETWEEN 2010 AND 2015 AND artist LIKE '50 cent' AND releaseType LIKE 'Single'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,065 | 2,065 |
CREATE TABLE `torrents`
(
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
[
"AND",
"SELECT",
"LIKE",
"COUNT",
"BETWEEN",
"FROM"
] | 18 |
challenging
|
{
"case_1": [
421
],
"case_2": [
38,
421,
591,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
2,
4,
10,
20,
22,
26,
30,
32,
37,
38,
39,
40,
43,
47,
51,
53,
57,
63,
67,
68,
69,
73,
74,
75,
76,
79,
82,
88,
90,
93,
96,
98,
109,
113,
115,
117,
118,
119,
125,
126,
127,
131,
142,
143,
146,
152,
160,
164,
168,
169,
170,
173,
175,
179,
183,
184,
187,
197,
202,
212,
214,
223,
227,
230,
240,
244,
247,
256,
258,
259,
267,
268,
276,
277,
294,
301,
305,
314,
315,
317,
319,
325,
330,
339,
341,
348,
350,
356,
370,
373,
374,
382,
383,
391,
399,
402,
403,
406,
416,
417,
421,
424,
426,
433,
436,
438,
444,
448,
451,
452,
463,
464,
469,
476,
477,
482,
490,
493,
500,
510,
512,
515,
516,
519,
520,
526,
530,
532,
537,
544,
554,
557,
558,
559,
562,
563,
581,
582,
591,
594,
595,
598,
608,
613,
618,
624,
627,
629,
632,
633,
641,
656,
663,
666,
667,
668,
671,
675,
677,
680,
686,
687,
692,
707,
712,
714,
718,
719,
727,
730,
734,
735,
739,
740,
743,
747,
749,
753,
754,
756,
760,
768,
777,
787,
788,
796,
797,
798,
799,
800,
804,
810,
814,
817,
819,
820,
824,
830,
831,
832,
838,
841,
843,
844,
849,
851,
853,
858,
864,
865,
867,
870,
877,
879,
886,
888,
896,
902,
903,
907,
909,
917,
918,
922,
923,
924,
930,
935,
944,
945,
954,
956,
958,
961,
965,
969,
985,
986,
996,
1000,
1008,
1014,
1018,
1019,
1020,
1022,
1023,
1042,
1057,
1058,
1059,
1064,
1067,
1070,
1071,
1072,
1079,
1081,
1084,
1086,
1092,
1096,
1100,
1101,
1103,
1104,
1117,
1119,
1121,
1123,
1126,
1128,
1131
]
}
|
music_tracker
|
An American rapper '2Pac' released his first solo album in 1991, how many years have passed until his next album was released?
|
2Pac is an artist; album refers to releaseType; groupYear = 1991; SUBTRACT(groupYear = 1991, groupYear where releaseType = 'album' LIMIT 1 OFFSET 1);
|
SELECT ( SELECT groupYear FROM torrents WHERE artist LIKE '2Pac' AND releaseType LIKE 'album' ORDER BY groupYear LIMIT 1, 1 ) - groupYear FROM torrents WHERE artist LIKE '2Pac' AND releaseType LIKE 'album' AND groupYear = 1991
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,066 | 2,066 |
CREATE TABLE `torrents`
(
artist TEXT,
groupYear INTEGER,
releaseType TEXT
)
|
[
"AND",
"SELECT",
"LIKE",
"LIMIT",
"ORDER BY",
"FROM"
] | 13 |
medium
|
{
"case_1": [
-1
],
"case_2": [
38,
421,
591,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
1,
10,
11,
13,
15,
17,
20,
26,
28,
29,
36,
38,
43,
49,
55,
57,
59,
62,
69,
73,
75,
78,
86,
89,
90,
108,
121,
125,
127,
131,
133,
138,
146,
150,
159,
162,
163,
167,
168,
173,
174,
179,
181,
184,
185,
187,
188,
199,
200,
202,
206,
208,
213,
229,
233,
239,
240,
247,
252,
258,
262,
263,
275,
277,
278,
281,
285,
286,
291,
309,
311,
313,
314,
315,
319,
320,
324,
329,
334,
336,
337,
341,
342,
345,
348,
349,
352,
353,
356,
359,
364,
365,
371,
373,
378,
379,
381,
385,
394,
395,
400,
402,
403,
404,
409,
411,
421,
428,
429,
433,
434,
435,
438,
444,
445,
451,
452,
454,
460,
462,
469,
476,
482,
495,
497,
505,
530,
532,
534,
536,
538,
542,
548,
552,
555,
557,
560,
566,
567,
576,
578,
579,
583,
584,
586,
590,
591,
592,
595,
611,
619,
621,
624,
625,
626,
634,
637,
638,
645,
654,
657,
659,
664,
665,
666,
669,
675,
681,
688,
690,
691,
698,
701,
703,
708,
713,
719,
732,
733,
735,
740,
743,
747,
748,
749,
752,
754,
756,
759,
760,
768,
778,
790,
800,
803,
804,
810,
815,
818,
823,
827,
830,
832,
836,
844,
850,
851,
858,
861,
866,
869,
870,
876,
879,
886,
889,
891,
893,
901,
907,
911,
917,
918,
924,
927,
929,
930,
934,
944,
946,
950,
951,
953,
954,
956,
962,
963,
966,
967,
970,
972,
973,
975,
977,
981,
983,
987,
989,
994,
1000,
1004,
1005,
1006,
1010,
1013,
1017,
1018,
1019,
1022,
1024,
1025,
1030,
1034,
1037,
1038,
1042,
1047,
1049,
1050,
1051,
1056,
1057,
1064,
1065,
1067,
1068,
1076,
1077,
1083,
1094,
1101,
1117,
1124,
1128,
1137,
1139,
1141
]
}
|
music_tracker
|
Find the average number of downloads for Single-Tables released by '2Pac' between 2001 and 2013.
|
2Pac is an artist; releaseType = 'single'; between 2001 and 2013 refers to groupYear between 2001 and 2013; average number of downloads = AVG(totalSnatched);
|
SELECT AVG(totalSnatched) FROM torrents WHERE artist LIKE '2Pac' AND releaseType LIKE 'Single' AND groupYear BETWEEN 2001 AND 2013
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,067 | 2,067 |
CREATE TABLE `torrents`
(
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT
)
|
[
"AND",
"SELECT",
"LIKE",
"AVG",
"BETWEEN",
"FROM"
] | 9 |
simple
|
{
"case_1": [
38,
591,
1018,
1117
],
"case_2": [
38,
421,
591,
1018,
1117
],
"case_3": [
26,
38,
403,
421,
591,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
2,
10,
20,
26,
32,
38,
39,
43,
57,
74,
76,
79,
90,
93,
98,
127,
131,
144,
146,
168,
184,
187,
223,
240,
256,
258,
277,
305,
315,
319,
325,
339,
341,
350,
356,
383,
399,
402,
403,
407,
421,
433,
438,
444,
451,
452,
463,
476,
482,
493,
530,
544,
557,
559,
562,
586,
591,
624,
656,
666,
667,
675,
677,
686,
740,
743,
747,
749,
754,
756,
777,
788,
798,
800,
804,
810,
832,
844,
849,
858,
864,
870,
879,
907,
917,
924,
930,
944,
954,
985,
1000,
1001,
1018,
1019,
1022,
1042,
1064,
1067,
1081,
1092,
1101,
1111,
1117,
1123,
1128
]
}
|
music_tracker
|
Provide the title, release year and the tag associated with the live album that has the highest number of downloads?
|
release year refers to groupYear; title of live album refers to groupName where releaseType = 'live album'; the highest number of downloads refers to MAX(totalSnatched);
|
SELECT T1.groupName, T1.groupYear, T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'live album' ORDER BY T1.totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,068 | 2,068 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
totalSnatched INTEGER,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"ORDER BY",
"LIMIT",
"INNER JOIN",
"ON",
"DESC",
"FROM"
] | 9 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
26,
27,
28,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
108,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
174,
175,
176,
177,
179,
180,
181,
183,
184,
185,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
208,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
252,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
285,
286,
287,
289,
290,
291,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
337,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
352,
353,
354,
356,
357,
358,
359,
360,
361,
363,
364,
365,
368,
369,
370,
371,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
534,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
576,
577,
578,
579,
580,
581,
582,
583,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
619,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
664,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
708,
710,
711,
712,
714,
715,
717,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
732,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
748,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
836,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
869,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
943,
944,
946,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
972,
973,
974,
975,
977,
980,
981,
983,
985,
986,
987,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1010,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1030,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1076,
1077,
1078,
1080,
1082,
1083,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1139,
1141
]
}
|
music_tracker
|
Provide the name of artists who released at least two bootlegs in 2016.
|
at least two bootlegs refer to COUNT(releaseType = 'bootleg')≥ 2; groupYear = 2016;
|
SELECT artist FROM torrents WHERE groupYear = 2016 AND releaseType LIKE 'bootleg' GROUP BY artist HAVING COUNT(releaseType) > 2
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,069 | 2,069 |
CREATE TABLE `torrents`
(
artist TEXT,
groupYear INTEGER,
releaseType TEXT
)
|
[
"GROUP BY",
"AND",
"SELECT",
"HAVING",
"LIKE",
"COUNT",
"FROM"
] | 7 |
simple
|
{
"case_1": [
38,
591,
1018,
1117
],
"case_2": [
38,
421,
591,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
1,
2,
4,
11,
13,
15,
20,
22,
26,
28,
30,
32,
36,
37,
38,
40,
47,
51,
53,
55,
57,
62,
63,
67,
68,
69,
73,
74,
75,
78,
82,
86,
88,
89,
90,
93,
96,
98,
108,
109,
113,
115,
117,
118,
119,
121,
125,
126,
127,
131,
140,
142,
143,
146,
152,
159,
160,
164,
167,
168,
169,
170,
173,
175,
179,
182,
183,
184,
187,
188,
191,
197,
199,
202,
206,
212,
214,
227,
229,
230,
233,
240,
244,
247,
252,
256,
258,
259,
267,
268,
276,
277,
286,
294,
301,
311,
314,
315,
317,
319,
320,
325,
330,
334,
339,
341,
344,
345,
348,
349,
352,
356,
359,
364,
370,
371,
373,
374,
377,
382,
383,
391,
394,
399,
402,
403,
406,
409,
411,
416,
417,
421,
424,
426,
433,
436,
438,
444,
445,
448,
452,
454,
460,
462,
464,
466,
469,
473,
476,
477,
481,
490,
493,
500,
505,
510,
512,
515,
516,
519,
520,
526,
532,
536,
537,
538,
542,
544,
548,
551,
552,
554,
557,
558,
559,
560,
563,
566,
581,
582,
586,
591,
594,
595,
598,
608,
611,
613,
618,
624,
627,
629,
630,
632,
633,
634,
641,
645,
651,
654,
656,
659,
663,
664,
665,
666,
667,
668,
669,
671,
675,
680,
681,
687,
688,
690,
692,
696,
698,
703,
707,
712,
714,
718,
719,
721,
727,
730,
733,
734,
735,
739,
740,
743,
747,
748,
749,
752,
753,
754,
756,
760,
768,
778,
779,
787,
790,
796,
797,
798,
799,
800,
804,
810,
814,
817,
818,
819,
820,
824,
827,
830,
831,
832,
838,
841,
843,
844,
849,
851,
853,
858,
865,
866,
867,
869,
870,
876,
877,
879,
886,
888,
893,
896,
901,
902,
903,
907,
909,
911,
917,
918,
922,
923,
924,
927,
930,
932,
934,
935,
944,
945,
950,
951,
954,
956,
958,
961,
963,
965,
969,
972,
975,
977,
981,
985,
986,
993,
996,
1000,
1005,
1006,
1008,
1010,
1013,
1014,
1018,
1019,
1020,
1022,
1023,
1030,
1037,
1042,
1043,
1047,
1050,
1051,
1057,
1058,
1059,
1064,
1067,
1070,
1071,
1072,
1076,
1077,
1079,
1084,
1086,
1094,
1096,
1100,
1101,
1103,
1104,
1106,
1117,
1119,
1121,
1123,
1124,
1126,
1128,
1131,
1135,
1137
]
}
|
music_tracker
|
Which artist released singles between 1980 to 1982?
|
releaseType = 'single'; between 1980 to 1982 refers to groupYear between 1980 and 1982;
|
SELECT artist FROM torrents WHERE groupYear BETWEEN 1980 AND 1982 AND releaseType LIKE 'single'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,070 | 2,070 |
CREATE TABLE `torrents`
(
artist TEXT,
groupYear INTEGER,
releaseType TEXT
)
|
[
"AND",
"SELECT",
"LIKE",
"BETWEEN",
"FROM"
] | 6 |
simple
|
{
"case_1": [
38,
591,
738,
1018,
1117
],
"case_2": [
38,
421,
591,
738,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
2,
3,
4,
5,
8,
10,
12,
19,
20,
21,
22,
24,
26,
30,
32,
33,
37,
38,
39,
40,
43,
44,
45,
47,
50,
51,
52,
53,
56,
57,
59,
63,
66,
67,
68,
69,
71,
73,
74,
75,
76,
79,
81,
82,
85,
88,
90,
93,
95,
96,
98,
99,
100,
109,
111,
112,
113,
114,
115,
116,
117,
118,
119,
125,
126,
127,
128,
129,
131,
136,
138,
141,
142,
143,
144,
146,
152,
154,
158,
160,
163,
164,
168,
169,
170,
172,
173,
175,
176,
177,
179,
180,
183,
184,
187,
197,
200,
202,
204,
212,
214,
219,
223,
227,
230,
239,
240,
244,
247,
255,
256,
258,
259,
262,
263,
264,
265,
266,
267,
268,
270,
272,
275,
276,
277,
278,
282,
294,
296,
301,
305,
314,
315,
317,
319,
325,
330,
339,
341,
348,
350,
356,
361,
362,
367,
368,
370,
373,
374,
376,
377,
382,
383,
385,
391,
393,
395,
397,
398,
399,
402,
403,
405,
406,
407,
408,
413,
414,
415,
416,
417,
418,
419,
421,
424,
425,
426,
427,
428,
430,
433,
436,
437,
438,
439,
440,
444,
446,
448,
451,
452,
455,
463,
464,
469,
470,
475,
476,
477,
480,
482,
490,
492,
493,
494,
496,
497,
498,
500,
507,
510,
512,
514,
515,
516,
519,
520,
522,
524,
525,
526,
528,
529,
530,
532,
533,
537,
539,
541,
544,
546,
551,
554,
557,
558,
559,
561,
562,
563,
581,
582,
584,
586,
588,
589,
591,
594,
595,
598,
599,
601,
605,
608,
610,
612,
613,
615,
618,
622,
624,
625,
626,
627,
629,
632,
633,
637,
641,
643,
648,
651,
656,
663,
666,
667,
668,
671,
675,
677,
678,
679,
680,
683,
684,
685,
686,
687,
690,
692,
693,
697,
699,
702,
707,
712,
714,
715,
716,
718,
719,
726,
727,
730,
734,
735,
738,
739,
740,
741,
743,
746,
747,
749,
753,
754,
756,
758,
760,
763,
765,
767,
768,
773,
774,
775,
776,
777,
780,
783,
785,
787,
788,
793,
794,
796,
797,
798,
799,
800,
804,
806,
807,
808,
810,
814,
817,
819,
820,
824,
825,
828,
829,
830,
831,
832,
835,
838,
840,
841,
843,
844,
848,
849,
850,
851,
853,
855,
858,
859,
860,
861,
864,
865,
867,
870,
873,
875,
877,
878,
879,
886,
888,
892,
895,
896,
902,
903,
905,
907,
909,
917,
918,
920,
922,
923,
924,
928,
930,
931,
932,
935,
944,
945,
948,
949,
953,
954,
956,
958,
961,
965,
969,
974,
979,
980,
985,
986,
991,
996,
998,
1000,
1001,
1008,
1009,
1014,
1017,
1018,
1019,
1020,
1022,
1023,
1027,
1031,
1039,
1042,
1044,
1046,
1054,
1057,
1058,
1059,
1061,
1063,
1064,
1067,
1068,
1070,
1071,
1072,
1073,
1079,
1080,
1081,
1084,
1086,
1092,
1096,
1098,
1100,
1101,
1103,
1104,
1105,
1109,
1111,
1115,
1117,
1119,
1121,
1123,
1126,
1128,
1131,
1136
]
}
|
music_tracker
|
Indicates groups with id from 10 to 20 with singles downloaded at least 20.
|
releaseType = 'single'; downloaded at least 20 refers to totalSnatched ≥ 20; id from 10 to 20 refer to id between 10 and 20; groups refer to groupName;
|
SELECT groupName FROM torrents WHERE totalSnatched >= 20 AND releaseType LIKE 'single' AND id BETWEEN 10 AND 20
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,071 | 2,071 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
totalSnatched INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
[
"AND",
"SELECT",
"LIKE",
"BETWEEN",
"FROM"
] | 7 |
simple
|
{
"case_1": [
38,
591,
738,
1018,
1117
],
"case_2": [
38,
421,
591,
738,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
2,
3,
4,
5,
8,
10,
12,
19,
20,
21,
22,
24,
26,
30,
32,
33,
37,
38,
39,
40,
43,
44,
45,
47,
50,
51,
52,
53,
56,
57,
59,
63,
66,
67,
68,
69,
71,
73,
74,
75,
76,
79,
81,
82,
85,
88,
90,
93,
95,
96,
98,
99,
100,
109,
111,
112,
113,
114,
115,
116,
117,
118,
119,
125,
126,
127,
128,
129,
131,
136,
138,
141,
142,
143,
144,
146,
152,
154,
158,
160,
163,
164,
168,
169,
170,
172,
173,
175,
176,
177,
179,
180,
183,
184,
187,
197,
200,
202,
204,
212,
214,
219,
223,
227,
230,
239,
240,
244,
247,
255,
256,
258,
259,
262,
263,
264,
265,
266,
267,
268,
270,
272,
275,
276,
277,
278,
282,
294,
296,
301,
305,
314,
315,
317,
319,
325,
330,
339,
341,
348,
350,
356,
361,
362,
367,
368,
370,
373,
374,
376,
377,
382,
383,
385,
391,
393,
395,
397,
398,
399,
402,
403,
405,
406,
407,
408,
413,
414,
415,
416,
417,
418,
419,
421,
424,
425,
426,
427,
428,
430,
433,
436,
437,
438,
439,
440,
444,
446,
448,
451,
452,
455,
463,
464,
469,
470,
475,
476,
477,
480,
482,
490,
492,
493,
494,
496,
497,
498,
500,
507,
510,
512,
514,
515,
516,
519,
520,
522,
524,
525,
526,
528,
529,
530,
532,
533,
537,
539,
541,
544,
546,
551,
554,
557,
558,
559,
561,
562,
563,
581,
582,
584,
586,
588,
589,
591,
594,
595,
598,
599,
601,
605,
608,
610,
612,
613,
615,
618,
622,
624,
625,
626,
627,
629,
632,
633,
637,
641,
643,
648,
651,
656,
663,
666,
667,
668,
671,
675,
677,
678,
679,
680,
683,
684,
685,
686,
687,
690,
692,
693,
697,
699,
702,
707,
712,
714,
715,
716,
718,
719,
726,
727,
730,
734,
735,
738,
739,
740,
741,
743,
746,
747,
749,
753,
754,
756,
758,
760,
763,
765,
767,
768,
773,
774,
775,
776,
777,
780,
783,
785,
787,
788,
793,
794,
796,
797,
798,
799,
800,
804,
806,
807,
808,
810,
814,
817,
819,
820,
824,
825,
828,
829,
830,
831,
832,
835,
838,
840,
841,
843,
844,
848,
849,
850,
851,
853,
855,
858,
859,
860,
861,
864,
865,
867,
870,
873,
875,
877,
878,
879,
886,
888,
892,
895,
896,
902,
903,
905,
907,
909,
917,
918,
920,
922,
923,
924,
928,
930,
931,
932,
935,
944,
945,
948,
949,
953,
954,
956,
958,
961,
965,
969,
974,
979,
980,
985,
986,
991,
996,
998,
1000,
1001,
1008,
1009,
1014,
1017,
1018,
1019,
1020,
1022,
1023,
1027,
1031,
1039,
1042,
1044,
1046,
1054,
1057,
1058,
1059,
1061,
1063,
1064,
1067,
1068,
1070,
1071,
1072,
1073,
1079,
1080,
1081,
1084,
1086,
1092,
1096,
1098,
1100,
1101,
1103,
1104,
1105,
1109,
1111,
1115,
1117,
1119,
1121,
1123,
1126,
1128,
1131,
1136
]
}
|
music_tracker
|
Among the artists from 1980 to 1982. Which artist was tagged as "disco"?
|
from 1980 to 1982 refers to groupYear between 1980 and 1982; tag = 'disco';
|
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'disco' AND T1.groupYear BETWEEN 1980 AND 1982
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,072 | 2,072 |
CREATE TABLE `torrents`
(
artist TEXT,
groupYear INTEGER,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"BETWEEN",
"FROM"
] | 9 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
421,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
36,
37,
39,
41,
42,
43,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
79,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
350,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
656,
657,
658,
659,
660,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
864,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1081,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Provide the name of artists who had no more than 100 downloads and are tagged "funk" in 1980.
|
no more than 100 downloads refer to totalSnatched ≤ 100; groupYear = 1980; tag = 'funk';
|
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'funk' AND T1.groupYear = 1980 AND T1.totalSnatched <= 100
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,073 | 2,073 |
CREATE TABLE `torrents`
(
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 8 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Which artist has released the most singles with the tag "soul"?
|
the most singles refer to MAX(COUNT(releaseType = 'single'));
|
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'soul' AND T1.releaseType = 'single' GROUP BY T1.artist ORDER BY COUNT(T1.releaseType) DESC LIMIT 1
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,074 | 2,074 |
CREATE TABLE `torrents`
(
artist TEXT,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"GROUP BY",
"AS",
"AND",
"SELECT",
"ORDER BY",
"LIMIT",
"INNER JOIN",
"ON",
"DESC",
"COUNT",
"FROM"
] | 12 |
medium
|
{
"case_1": [
125,
403,
917
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
4,
5,
6,
8,
10,
11,
12,
13,
15,
16,
19,
20,
21,
22,
24,
26,
27,
28,
29,
30,
33,
36,
37,
38,
39,
44,
45,
47,
49,
51,
52,
53,
55,
57,
59,
62,
63,
66,
68,
69,
71,
73,
74,
75,
76,
77,
78,
82,
85,
86,
88,
89,
90,
91,
93,
95,
96,
98,
99,
106,
108,
111,
112,
113,
115,
116,
117,
118,
119,
121,
125,
126,
127,
128,
129,
131,
138,
140,
141,
142,
143,
144,
146,
148,
150,
152,
154,
158,
159,
160,
162,
163,
164,
167,
169,
170,
172,
173,
175,
176,
177,
179,
180,
183,
184,
185,
187,
188,
189,
190,
191,
196,
197,
199,
200,
202,
206,
212,
213,
214,
219,
225,
226,
227,
229,
233,
234,
239,
240,
243,
244,
247,
252,
254,
256,
258,
261,
262,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
281,
282,
285,
286,
291,
296,
299,
301,
309,
311,
313,
314,
315,
316,
317,
319,
320,
323,
324,
325,
329,
330,
334,
335,
336,
338,
339,
341,
342,
344,
345,
348,
349,
352,
353,
354,
356,
358,
359,
360,
361,
364,
365,
368,
370,
371,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
408,
409,
411,
412,
413,
414,
416,
417,
419,
424,
425,
426,
427,
428,
429,
433,
434,
435,
436,
437,
438,
440,
444,
445,
446,
448,
451,
452,
454,
455,
460,
462,
463,
464,
465,
467,
469,
470,
471,
473,
475,
476,
477,
478,
480,
482,
484,
487,
488,
490,
493,
494,
495,
496,
497,
498,
500,
505,
507,
509,
514,
515,
516,
519,
520,
522,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
541,
542,
544,
547,
548,
552,
557,
558,
559,
560,
561,
562,
563,
564,
566,
567,
573,
578,
579,
580,
581,
582,
584,
586,
588,
589,
590,
592,
595,
596,
597,
605,
606,
608,
610,
611,
612,
613,
615,
620,
621,
624,
625,
626,
627,
630,
632,
633,
634,
637,
638,
641,
643,
645,
646,
648,
649,
651,
654,
657,
658,
659,
662,
663,
664,
665,
666,
668,
669,
671,
675,
677,
678,
681,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
696,
697,
698,
699,
701,
702,
703,
705,
712,
714,
715,
719,
720,
721,
726,
727,
733,
734,
735,
736,
739,
740,
741,
743,
746,
747,
748,
749,
750,
751,
752,
753,
754,
756,
758,
759,
760,
762,
763,
765,
767,
768,
769,
772,
773,
775,
776,
777,
778,
779,
780,
783,
787,
788,
790,
793,
796,
797,
799,
800,
802,
803,
804,
806,
807,
808,
810,
812,
813,
814,
818,
819,
823,
824,
825,
827,
829,
830,
832,
835,
838,
839,
841,
844,
848,
849,
850,
851,
853,
857,
858,
859,
860,
861,
866,
867,
869,
870,
873,
874,
876,
877,
878,
879,
882,
886,
888,
889,
891,
892,
893,
895,
896,
897,
898,
901,
902,
905,
907,
909,
911,
912,
915,
917,
918,
922,
923,
924,
926,
927,
928,
929,
930,
931,
932,
934,
935,
943,
944,
949,
950,
951,
953,
954,
956,
958,
961,
962,
963,
966,
967,
969,
970,
972,
973,
974,
975,
977,
981,
983,
985,
986,
987,
991,
993,
994,
996,
1000,
1001,
1004,
1005,
1006,
1010,
1013,
1015,
1017,
1019,
1022,
1023,
1025,
1027,
1030,
1031,
1034,
1037,
1038,
1039,
1042,
1043,
1044,
1046,
1047,
1049,
1050,
1051,
1056,
1057,
1058,
1061,
1062,
1063,
1064,
1065,
1067,
1068,
1071,
1072,
1076,
1077,
1078,
1080,
1082,
1084,
1086,
1087,
1091,
1092,
1094,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1112,
1115,
1119,
1123,
1124,
1128,
1131,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Among the artists with the id from 10 to 30. Which artist released the product with the tag "funk" in 1980?
|
id from 10 to 30 refers to id between 10 and 30; groupYear = 1980;
|
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'funk' AND T1.groupYear = 1980 AND T1.id BETWEEN 10 AND 30
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,075 | 2,075 |
CREATE TABLE `torrents`
(
artist TEXT,
groupYear INTEGER,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"BETWEEN",
"FROM"
] | 10 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
421,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
36,
37,
39,
41,
42,
43,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
79,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
350,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
656,
657,
658,
659,
660,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
864,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1081,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
List the group name has the most downloaded that have released jazz genres from 1982 or later.
|
the most downloaded refers to MAX(totalSnatched); tag = 'jazz'; from 1982 or later refers to groupYear ≥ 1982;
|
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'jazz' AND T1.groupYear >= 1982 ORDER BY T1.totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,076 | 2,076 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
totalSnatched INTEGER,
groupYear INTEGER,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"ORDER BY",
"LIMIT",
"INNER JOIN",
"ON",
"DESC",
"FROM"
] | 10 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
3,
4,
5,
6,
7,
8,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
26,
27,
28,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
43,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
80,
81,
82,
83,
84,
85,
86,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
108,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
173,
174,
175,
176,
177,
179,
180,
181,
183,
184,
185,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
208,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
252,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
285,
286,
287,
289,
290,
291,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
337,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
348,
349,
352,
353,
354,
356,
357,
358,
359,
360,
361,
363,
364,
365,
368,
369,
370,
371,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
534,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
576,
577,
578,
579,
580,
581,
582,
583,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
619,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
664,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
708,
710,
711,
712,
714,
715,
717,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
732,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
748,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
836,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
869,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
943,
944,
946,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
972,
973,
974,
975,
977,
980,
981,
983,
985,
986,
987,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1010,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1030,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1057,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1076,
1077,
1078,
1080,
1082,
1083,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1139,
1141
]
}
|
music_tracker
|
Which artist has id "16"? Provide her or his tag genre.
|
FALSE;
|
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.id = 16
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,077 | 2,077 |
CREATE TABLE `torrents`
(
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 6 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
35,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
101,
102,
104,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
215,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
506,
507,
508,
509,
510,
511,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
527,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
555,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
653,
654,
655,
657,
658,
659,
660,
661,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
781,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
929,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
978,
980,
981,
982,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1004,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1075,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Among id from 10 to 50. Which artist tagged as "new.york" has the most downloads?
|
Among id from 10 to 50 refers to id between 10 and 50; tag = 'new.york'; the most downloads refer to MAX(totalSnatched);
|
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.id BETWEEN 10 AND 50 AND T2.tag LIKE 'new.york' ORDER BY T1.totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,078 | 2,078 |
CREATE TABLE `torrents`
(
totalSnatched INTEGER,
artist TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"LIKE",
"LIMIT",
"ORDER BY",
"INNER JOIN",
"ON",
"DESC",
"BETWEEN",
"FROM"
] | 13 |
medium
|
{
"case_1": [
125,
403,
917
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
1,
3,
4,
5,
8,
10,
11,
12,
19,
20,
21,
22,
24,
26,
29,
30,
33,
36,
37,
38,
39,
43,
44,
45,
47,
49,
51,
52,
53,
55,
57,
59,
62,
63,
66,
68,
69,
71,
73,
74,
75,
76,
81,
82,
85,
86,
88,
89,
90,
93,
95,
96,
98,
99,
111,
112,
113,
115,
116,
117,
118,
119,
121,
125,
126,
127,
128,
129,
131,
136,
138,
141,
142,
143,
144,
146,
150,
152,
154,
158,
159,
160,
162,
163,
164,
167,
169,
170,
172,
173,
175,
176,
177,
179,
180,
183,
184,
187,
188,
197,
199,
200,
202,
206,
212,
213,
214,
219,
227,
229,
233,
239,
240,
244,
247,
256,
258,
262,
263,
264,
265,
266,
267,
268,
272,
275,
276,
277,
278,
281,
282,
286,
296,
301,
309,
311,
313,
314,
315,
317,
319,
320,
324,
325,
329,
330,
334,
336,
339,
341,
342,
345,
348,
349,
353,
356,
361,
364,
365,
368,
370,
373,
374,
376,
378,
379,
381,
382,
383,
385,
391,
393,
394,
395,
398,
402,
403,
405,
406,
407,
408,
409,
411,
413,
414,
415,
416,
417,
419,
424,
425,
426,
427,
428,
429,
430,
433,
434,
435,
436,
437,
438,
440,
444,
445,
446,
448,
451,
452,
454,
455,
460,
462,
463,
464,
469,
470,
475,
476,
477,
480,
482,
490,
493,
494,
495,
496,
497,
498,
500,
505,
507,
514,
515,
516,
519,
520,
522,
524,
526,
528,
529,
530,
532,
533,
536,
537,
538,
539,
541,
542,
544,
548,
552,
557,
558,
559,
560,
561,
562,
563,
566,
567,
578,
579,
581,
582,
584,
586,
588,
589,
590,
592,
595,
605,
608,
610,
611,
612,
613,
615,
621,
624,
625,
626,
627,
632,
633,
634,
637,
638,
641,
643,
645,
648,
651,
654,
657,
659,
663,
665,
666,
668,
669,
671,
675,
677,
678,
681,
683,
684,
685,
686,
687,
688,
690,
691,
693,
697,
699,
701,
702,
712,
714,
715,
719,
726,
727,
733,
734,
735,
739,
740,
741,
743,
746,
747,
749,
752,
753,
754,
756,
758,
759,
760,
763,
765,
767,
768,
773,
774,
775,
776,
777,
778,
780,
783,
787,
788,
790,
793,
796,
797,
799,
800,
803,
804,
806,
807,
808,
810,
814,
818,
819,
823,
824,
825,
827,
828,
829,
830,
832,
835,
838,
841,
844,
848,
849,
850,
851,
853,
858,
859,
860,
861,
866,
867,
870,
873,
875,
876,
877,
878,
879,
886,
888,
889,
891,
892,
893,
895,
896,
901,
902,
905,
907,
909,
911,
917,
918,
922,
923,
924,
927,
928,
929,
930,
931,
932,
934,
935,
944,
949,
950,
951,
953,
954,
956,
958,
961,
962,
963,
966,
967,
969,
970,
973,
974,
975,
977,
980,
981,
985,
986,
991,
994,
996,
1000,
1001,
1004,
1005,
1006,
1010,
1013,
1017,
1019,
1022,
1023,
1025,
1027,
1031,
1034,
1037,
1038,
1039,
1042,
1044,
1046,
1047,
1049,
1050,
1051,
1056,
1057,
1058,
1061,
1063,
1064,
1065,
1067,
1068,
1071,
1072,
1080,
1084,
1086,
1092,
1094,
1098,
1100,
1101,
1103,
1104,
1105,
1109,
1111,
1115,
1119,
1123,
1124,
1128,
1131,
1136,
1137
]
}
|
music_tracker
|
List the name of artists who have released albums and mixtape from 1980 to 1985 in "dance" genre.
|
albums and mixtape refer to releaseType; from 1980 to 1985 refers to groupYear between 1980 and 1985; tag = 'dance';
|
SELECT COUNT(T1.artist) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'dance' AND T1.groupYear BETWEEN 1980 AND 1985 AND T1.releaseType LIKE 'album' OR T1.releaseType LIKE 'mixtape'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,079 | 2,079 |
CREATE TABLE `torrents`
(
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"OR",
"AND",
"SELECT",
"AS",
"LIKE",
"INNER JOIN",
"ON",
"COUNT",
"BETWEEN",
"FROM"
] | 14 |
medium
|
{
"case_1": [
125,
403,
917
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
421,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
8,
11,
12,
16,
19,
20,
21,
22,
24,
26,
27,
30,
33,
36,
37,
39,
42,
44,
45,
47,
51,
52,
53,
55,
57,
59,
62,
63,
66,
68,
69,
71,
73,
74,
75,
76,
77,
81,
82,
85,
86,
88,
90,
91,
93,
95,
96,
98,
99,
106,
111,
112,
113,
115,
116,
117,
118,
119,
121,
125,
126,
127,
128,
129,
131,
136,
138,
140,
141,
142,
143,
144,
146,
148,
152,
154,
158,
159,
160,
163,
164,
167,
169,
170,
172,
175,
176,
177,
179,
180,
183,
184,
187,
188,
189,
190,
191,
196,
197,
199,
200,
202,
206,
212,
214,
219,
225,
226,
227,
229,
233,
234,
239,
240,
243,
244,
247,
254,
256,
258,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
282,
296,
299,
301,
311,
314,
315,
316,
317,
319,
320,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
349,
354,
356,
358,
360,
361,
364,
368,
370,
373,
374,
375,
376,
382,
383,
384,
385,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
424,
425,
426,
427,
428,
430,
433,
436,
437,
438,
440,
444,
445,
446,
448,
451,
452,
454,
455,
460,
462,
463,
464,
465,
467,
469,
470,
471,
473,
475,
476,
477,
478,
480,
482,
484,
487,
488,
490,
493,
494,
496,
497,
498,
500,
505,
507,
509,
514,
515,
516,
519,
520,
522,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
541,
544,
547,
548,
552,
557,
558,
559,
560,
561,
562,
563,
564,
566,
573,
580,
581,
582,
584,
586,
588,
589,
595,
596,
597,
605,
606,
608,
610,
611,
612,
613,
615,
620,
624,
625,
626,
627,
630,
632,
633,
634,
637,
641,
643,
645,
646,
648,
649,
651,
654,
658,
659,
662,
663,
665,
666,
668,
669,
671,
675,
677,
678,
681,
683,
684,
685,
686,
687,
688,
690,
693,
694,
696,
697,
699,
702,
705,
712,
714,
715,
721,
726,
727,
733,
734,
735,
736,
739,
740,
741,
743,
746,
747,
749,
750,
752,
753,
754,
756,
758,
760,
762,
763,
765,
767,
768,
769,
772,
773,
774,
775,
776,
777,
778,
779,
780,
783,
787,
788,
790,
793,
796,
797,
798,
799,
800,
802,
804,
806,
807,
808,
810,
812,
813,
814,
818,
819,
824,
825,
827,
828,
829,
830,
832,
835,
838,
839,
841,
844,
848,
849,
850,
851,
853,
857,
858,
859,
860,
861,
866,
867,
870,
873,
874,
875,
876,
877,
878,
879,
886,
888,
892,
893,
895,
896,
897,
898,
901,
902,
905,
907,
909,
911,
912,
915,
917,
918,
922,
923,
924,
926,
927,
928,
930,
931,
932,
934,
935,
943,
944,
949,
950,
951,
953,
954,
956,
958,
961,
963,
969,
974,
975,
977,
980,
981,
985,
986,
991,
993,
996,
1000,
1001,
1005,
1006,
1010,
1013,
1015,
1017,
1019,
1022,
1023,
1027,
1031,
1037,
1039,
1042,
1043,
1044,
1046,
1047,
1050,
1051,
1058,
1061,
1062,
1063,
1064,
1067,
1068,
1071,
1072,
1078,
1080,
1082,
1084,
1086,
1087,
1092,
1094,
1098,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1115,
1119,
1123,
1124,
1128,
1131,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
How many singles were released between 1979 and 1981 labeled as "soul"?
|
releaseType = 'single'; between 1979 and 1981 refers to groupYear between 1979 and 1981; tag = 'soul';
|
SELECT COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'soul' AND T1.groupYear BETWEEN 1979 AND 1981 AND T1.releaseType LIKE 'single'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,080 | 2,080 |
CREATE TABLE `torrents`
(
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"LIKE",
"INNER JOIN",
"ON",
"COUNT",
"BETWEEN",
"FROM"
] | 12 |
medium
|
{
"case_1": [
125,
403,
917
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
421,
591,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
656,
657,
658,
659,
660,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
How many singles were released in 1979?
|
releaseType = 'single'; groupYear = 1979;
|
SELECT COUNT(releaseType) FROM torrents WHERE releaseType LIKE 'single' AND groupYear = 1979
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,081 | 2,081 |
CREATE TABLE `torrents`
(
groupYear INTEGER,
releaseType TEXT
)
|
[
"AND",
"SELECT",
"LIKE",
"COUNT",
"FROM"
] | 5 |
simple
|
{
"case_1": [
38,
591,
738,
1018,
1117
],
"case_2": [
38,
421,
591,
738,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
8,
9,
10,
11,
12,
13,
15,
16,
19,
20,
21,
22,
24,
25,
26,
27,
28,
30,
32,
33,
35,
36,
37,
38,
39,
40,
43,
44,
45,
47,
50,
51,
52,
53,
55,
56,
57,
59,
61,
62,
63,
66,
67,
68,
69,
71,
73,
74,
75,
76,
77,
78,
79,
81,
82,
85,
86,
87,
88,
89,
90,
91,
93,
95,
96,
98,
99,
100,
106,
108,
109,
111,
112,
113,
114,
115,
116,
117,
118,
119,
121,
124,
125,
126,
127,
128,
129,
131,
136,
138,
140,
141,
142,
143,
144,
146,
147,
148,
152,
154,
157,
158,
159,
160,
163,
164,
167,
168,
169,
170,
172,
173,
175,
176,
177,
179,
180,
182,
183,
184,
185,
187,
188,
189,
190,
191,
192,
196,
197,
198,
199,
200,
202,
203,
204,
206,
210,
212,
214,
216,
219,
223,
224,
225,
226,
227,
229,
230,
233,
234,
239,
240,
243,
244,
247,
252,
254,
255,
256,
258,
259,
261,
262,
263,
264,
265,
266,
267,
268,
269,
270,
271,
272,
273,
275,
276,
277,
278,
282,
286,
291,
293,
294,
296,
299,
301,
303,
305,
311,
314,
315,
316,
317,
319,
320,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
348,
349,
350,
352,
354,
356,
358,
359,
360,
361,
362,
364,
367,
368,
370,
371,
373,
374,
375,
376,
377,
380,
382,
383,
384,
385,
391,
392,
393,
394,
395,
397,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
410,
411,
412,
413,
414,
415,
416,
417,
418,
419,
420,
421,
423,
424,
425,
426,
427,
428,
430,
433,
436,
437,
438,
439,
440,
443,
444,
445,
446,
447,
448,
451,
452,
453,
454,
455,
458,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
473,
475,
476,
477,
478,
480,
481,
482,
484,
485,
487,
488,
490,
492,
493,
494,
496,
497,
498,
500,
504,
505,
507,
509,
510,
512,
514,
515,
516,
517,
519,
520,
522,
524,
525,
526,
528,
529,
530,
531,
532,
533,
535,
536,
537,
538,
539,
541,
542,
543,
544,
545,
546,
547,
548,
551,
552,
554,
557,
558,
559,
560,
561,
562,
563,
564,
566,
573,
580,
581,
582,
584,
585,
586,
588,
589,
591,
594,
595,
596,
597,
598,
599,
601,
603,
605,
606,
608,
610,
611,
612,
613,
615,
618,
620,
622,
624,
625,
626,
627,
629,
630,
632,
633,
634,
637,
641,
643,
645,
646,
648,
649,
651,
654,
656,
658,
659,
661,
662,
663,
664,
665,
666,
667,
668,
669,
671,
673,
675,
677,
678,
679,
680,
681,
683,
684,
685,
686,
687,
688,
689,
690,
692,
693,
694,
696,
697,
698,
699,
702,
703,
705,
707,
712,
714,
715,
716,
718,
719,
721,
726,
727,
730,
733,
734,
735,
736,
737,
738,
739,
740,
741,
743,
746,
747,
748,
749,
750,
752,
753,
754,
756,
757,
758,
760,
762,
763,
765,
767,
768,
769,
770,
772,
773,
774,
775,
776,
777,
778,
779,
780,
783,
785,
787,
788,
790,
793,
794,
795,
796,
797,
798,
799,
800,
802,
804,
806,
807,
808,
810,
811,
812,
813,
814,
817,
818,
819,
820,
821,
824,
825,
827,
828,
829,
830,
831,
832,
835,
838,
839,
840,
841,
843,
844,
848,
849,
850,
851,
853,
855,
857,
858,
859,
860,
861,
864,
865,
866,
867,
869,
870,
873,
874,
875,
876,
877,
878,
879,
886,
888,
890,
892,
893,
894,
895,
896,
897,
898,
899,
901,
902,
903,
905,
907,
909,
911,
912,
913,
915,
917,
918,
920,
922,
923,
924,
926,
927,
928,
930,
931,
932,
934,
935,
941,
942,
943,
944,
945,
948,
949,
950,
951,
953,
954,
956,
958,
960,
961,
963,
965,
968,
969,
972,
974,
975,
976,
977,
979,
980,
981,
983,
985,
986,
991,
993,
996,
998,
1000,
1001,
1005,
1006,
1008,
1009,
1010,
1011,
1013,
1014,
1015,
1017,
1018,
1019,
1020,
1022,
1023,
1027,
1030,
1031,
1037,
1039,
1042,
1043,
1044,
1046,
1047,
1050,
1051,
1053,
1054,
1055,
1057,
1058,
1059,
1061,
1062,
1063,
1064,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1084,
1086,
1087,
1090,
1092,
1094,
1096,
1098,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1115,
1117,
1119,
1121,
1123,
1124,
1126,
1127,
1128,
1131,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
In 1980, how many singles were released by sugar daddy?
|
sugar daddy is an artist; releaseType = 'single'; groupYear = 1980;
|
SELECT COUNT(releaseType) FROM torrents WHERE artist LIKE 'sugar daddy' AND releaseType LIKE 'Single' AND groupYear = 1980
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,082 | 2,082 |
CREATE TABLE `torrents`
(
artist TEXT,
groupYear INTEGER,
releaseType TEXT
)
|
[
"AND",
"SELECT",
"LIKE",
"COUNT",
"FROM"
] | 7 |
simple
|
{
"case_1": [
38,
591,
738,
1018,
1117
],
"case_2": [
38,
421,
591,
738,
1018,
1117
],
"case_3": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
8,
9,
10,
11,
12,
13,
15,
16,
19,
20,
21,
22,
24,
25,
26,
27,
28,
30,
32,
33,
35,
36,
37,
38,
39,
40,
43,
44,
45,
47,
50,
51,
52,
53,
55,
56,
57,
59,
61,
62,
63,
66,
67,
68,
69,
71,
73,
74,
75,
76,
77,
78,
79,
81,
82,
85,
86,
87,
88,
89,
90,
91,
93,
95,
96,
98,
99,
100,
106,
108,
109,
111,
112,
113,
114,
115,
116,
117,
118,
119,
121,
124,
125,
126,
127,
128,
129,
131,
136,
138,
140,
141,
142,
143,
144,
146,
147,
148,
152,
154,
157,
158,
159,
160,
163,
164,
167,
168,
169,
170,
172,
173,
175,
176,
177,
179,
180,
182,
183,
184,
185,
187,
188,
189,
190,
191,
192,
196,
197,
198,
199,
200,
202,
203,
204,
206,
210,
212,
214,
216,
219,
223,
224,
225,
226,
227,
229,
230,
233,
234,
239,
240,
243,
244,
247,
252,
254,
255,
256,
258,
259,
261,
262,
263,
264,
265,
266,
267,
268,
269,
270,
271,
272,
273,
275,
276,
277,
278,
282,
286,
291,
293,
294,
296,
299,
301,
303,
305,
311,
314,
315,
316,
317,
319,
320,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
348,
349,
350,
352,
354,
356,
358,
359,
360,
361,
362,
364,
367,
368,
370,
371,
373,
374,
375,
376,
377,
380,
382,
383,
384,
385,
391,
392,
393,
394,
395,
397,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
410,
411,
412,
413,
414,
415,
416,
417,
418,
419,
420,
421,
423,
424,
425,
426,
427,
428,
430,
433,
436,
437,
438,
439,
440,
443,
444,
445,
446,
447,
448,
451,
452,
453,
454,
455,
458,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
473,
475,
476,
477,
478,
480,
481,
482,
484,
485,
487,
488,
490,
492,
493,
494,
496,
497,
498,
500,
504,
505,
507,
509,
510,
512,
514,
515,
516,
517,
519,
520,
522,
524,
525,
526,
528,
529,
530,
531,
532,
533,
535,
536,
537,
538,
539,
541,
542,
543,
544,
545,
546,
547,
548,
551,
552,
554,
557,
558,
559,
560,
561,
562,
563,
564,
566,
573,
580,
581,
582,
584,
585,
586,
588,
589,
591,
594,
595,
596,
597,
598,
599,
601,
603,
605,
606,
608,
610,
611,
612,
613,
615,
618,
620,
622,
624,
625,
626,
627,
629,
630,
632,
633,
634,
637,
641,
643,
645,
646,
648,
649,
651,
654,
656,
658,
659,
661,
662,
663,
664,
665,
666,
667,
668,
669,
671,
673,
675,
677,
678,
679,
680,
681,
683,
684,
685,
686,
687,
688,
689,
690,
692,
693,
694,
696,
697,
698,
699,
702,
703,
705,
707,
712,
714,
715,
716,
718,
719,
721,
726,
727,
730,
733,
734,
735,
736,
737,
738,
739,
740,
741,
743,
746,
747,
748,
749,
750,
752,
753,
754,
756,
757,
758,
760,
762,
763,
765,
767,
768,
769,
770,
772,
773,
774,
775,
776,
777,
778,
779,
780,
783,
785,
787,
788,
790,
793,
794,
795,
796,
797,
798,
799,
800,
802,
804,
806,
807,
808,
810,
811,
812,
813,
814,
817,
818,
819,
820,
821,
824,
825,
827,
828,
829,
830,
831,
832,
835,
838,
839,
840,
841,
843,
844,
848,
849,
850,
851,
853,
855,
857,
858,
859,
860,
861,
864,
865,
866,
867,
869,
870,
873,
874,
875,
876,
877,
878,
879,
886,
888,
890,
892,
893,
894,
895,
896,
897,
898,
899,
901,
902,
903,
905,
907,
909,
911,
912,
913,
915,
917,
918,
920,
922,
923,
924,
926,
927,
928,
930,
931,
932,
934,
935,
941,
942,
943,
944,
945,
948,
949,
950,
951,
953,
954,
956,
958,
960,
961,
963,
965,
968,
969,
972,
974,
975,
976,
977,
979,
980,
981,
983,
985,
986,
991,
993,
996,
998,
1000,
1001,
1005,
1006,
1008,
1009,
1010,
1011,
1013,
1014,
1015,
1017,
1018,
1019,
1020,
1022,
1023,
1027,
1030,
1031,
1037,
1039,
1042,
1043,
1044,
1046,
1047,
1050,
1051,
1053,
1054,
1055,
1057,
1058,
1059,
1061,
1062,
1063,
1064,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1084,
1086,
1087,
1090,
1092,
1094,
1096,
1098,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1115,
1117,
1119,
1121,
1123,
1124,
1126,
1127,
1128,
1131,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
How many christmas albums were released in 2004?
|
album refers to releaseType; groupYear = 2004; tag = 'christmas';
|
SELECT COUNT(T1.id) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'christmas' AND T1.groupYear = 2004 AND T1.releaseType LIKE 'album'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,083 | 2,083 |
CREATE TABLE `torrents`
(
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"LIKE",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 10 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
421,
591,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Please list all tags of kurtis blow from 2000 to 2010.
|
kurtis blow is an artist; from 2000 to 2010 refers to groupYear between 2000 and 2010;
|
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 2000 AND 2010 AND T1.artist LIKE 'kurtis blow'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,084 | 2,084 |
CREATE TABLE `torrents`
(
artist TEXT,
groupYear INTEGER,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"LIKE",
"INNER JOIN",
"ON",
"BETWEEN",
"FROM"
] | 10 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
421,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Which album title and tag that millie jackson released in 1980?
|
millie jackson is an artist; album title refers to groupName where releaseType = 'album'; groupYear = 1980;
|
SELECT T1.groupName, T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear = 1980 AND T1.artist LIKE 'millie jackson' AND T1.releaseType LIKE 'album'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,085 | 2,085 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"LIKE",
"INNER JOIN",
"ON",
"FROM"
] | 10 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
421,
591,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1018,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1117,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
Please list all release titles whose tag is jazz in 2005.
|
release titles refer to groupName; groupYear = 2005;
|
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear = 2005 AND T2.tag LIKE 'jazz'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,086 | 2,086 |
CREATE TABLE `torrents`
(
CREATE TABLE "torrents"
groupName TEXT,
groupYear INTEGER,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"LIKE",
"INNER JOIN",
"ON",
"FROM"
] | 8 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
421,
591,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1018,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1117,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
From 1980 to 2000, which artist had the most disco releases?
|
From 1980 to 2000 refers to groupYear between 1980 and 2000; tag = 'disco'; the most releases refer to MAX(COUNT(id));
|
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 1980 AND 2000 AND T2.tag LIKE 'disco' GROUP BY T1.artist ORDER BY COUNT(T2.tag) DESC LIMIT 1
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,087 | 2,087 |
CREATE TABLE `torrents`
(
artist TEXT,
groupYear INTEGER,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"GROUP BY",
"AS",
"AND",
"SELECT",
"LIKE",
"LIMIT",
"ORDER BY",
"INNER JOIN",
"ON",
"DESC",
"COUNT",
"BETWEEN",
"FROM"
] | 15 |
medium
|
{
"case_1": [
125,
403,
917
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
1,
4,
10,
11,
13,
15,
20,
22,
26,
28,
29,
30,
36,
37,
38,
39,
47,
49,
51,
53,
55,
57,
59,
62,
63,
68,
69,
73,
74,
75,
76,
78,
82,
86,
88,
89,
90,
93,
96,
98,
108,
113,
115,
117,
118,
119,
121,
125,
126,
127,
131,
138,
140,
142,
143,
146,
150,
152,
159,
160,
162,
163,
164,
167,
169,
170,
173,
175,
179,
183,
184,
187,
188,
191,
197,
199,
200,
202,
206,
212,
213,
214,
227,
229,
233,
239,
240,
244,
247,
252,
256,
258,
262,
267,
268,
275,
276,
277,
278,
281,
286,
301,
309,
311,
313,
314,
315,
317,
319,
320,
324,
325,
329,
330,
334,
336,
339,
341,
342,
344,
345,
348,
349,
352,
353,
356,
359,
364,
365,
370,
371,
373,
374,
378,
379,
381,
382,
383,
385,
391,
394,
395,
402,
403,
406,
409,
411,
416,
417,
424,
426,
428,
429,
433,
434,
435,
436,
438,
444,
445,
448,
451,
452,
454,
460,
462,
463,
464,
469,
473,
476,
477,
482,
490,
493,
495,
497,
500,
505,
515,
516,
519,
520,
526,
530,
532,
536,
537,
538,
542,
544,
548,
552,
557,
558,
559,
560,
562,
563,
566,
567,
578,
579,
581,
582,
584,
586,
590,
592,
595,
608,
611,
613,
621,
624,
625,
626,
627,
630,
632,
633,
634,
637,
638,
641,
645,
651,
654,
657,
659,
663,
664,
665,
666,
668,
669,
671,
675,
677,
681,
686,
687,
688,
690,
691,
696,
698,
701,
703,
712,
714,
719,
721,
727,
733,
734,
735,
739,
740,
743,
747,
748,
749,
752,
753,
754,
756,
759,
760,
768,
777,
778,
779,
787,
788,
790,
796,
797,
799,
800,
803,
804,
810,
814,
818,
819,
823,
824,
827,
830,
832,
838,
841,
844,
849,
850,
851,
853,
858,
861,
866,
867,
869,
870,
876,
877,
879,
886,
888,
889,
891,
893,
896,
901,
902,
907,
909,
911,
917,
918,
922,
923,
924,
927,
929,
930,
932,
934,
935,
944,
950,
951,
953,
954,
956,
958,
961,
962,
963,
966,
967,
969,
970,
972,
973,
975,
977,
981,
985,
986,
993,
994,
996,
1000,
1005,
1006,
1010,
1013,
1017,
1019,
1022,
1023,
1025,
1030,
1034,
1037,
1038,
1042,
1043,
1047,
1049,
1050,
1051,
1056,
1057,
1058,
1064,
1065,
1067,
1068,
1071,
1072,
1076,
1077,
1084,
1086,
1092,
1094,
1100,
1101,
1103,
1104,
1106,
1119,
1123,
1124,
1128,
1131,
1135,
1137
]
}
|
music_tracker
|
Which artists have released singles with the tag 1970s?
|
releaseType = 'single';
|
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'single' AND T2.tag LIKE '1970s'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,088 | 2,088 |
CREATE TABLE `torrents`
(
artist TEXT,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"AS",
"AND",
"SELECT",
"LIKE",
"INNER JOIN",
"ON",
"FROM"
] | 8 |
simple
|
{
"case_1": [
26,
907
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
38,
125,
403,
421,
591,
740,
907,
917,
1018,
1117
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
38,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
263,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1018,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1070,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1117,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
music_tracker
|
From 1979 to 1982, what was the percentage of united.states albums out of total albums were released?
|
From 1979 to 1982 refers to groupYear between 1979 and 1982; United States refer to tag; albums refer to releaseType; DIVIDE(COUNT(releaseType = 'album' where tag = 'united.states' and groupYear between 1979 and 1982), COUNT(releaseType = 'album' where groupYear between 1979 and 1982)) as percentage;
|
SELECT CAST(SUM(CASE WHEN T2.tag LIKE 'united.states' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.releaseType) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 1979 AND 1982 AND T1.releaseType LIKE 'album'
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
CREATE TABLE "torrents"
(
groupName TEXT,
totalSnatched INTEGER,
artist TEXT,
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE "tags"
(
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
CREATE INDEX ix_tags_index
on tags ("index")
|
na
| 2,089 | 2,089 |
CREATE TABLE `torrents`
(
groupYear INTEGER,
releaseType TEXT,
groupId INTEGER,
id INTEGER
constraint torrents_pk
primary key
)
CREATE TABLE `tags`
(
CREATE TABLE "tags"
"index" INTEGER
constraint tags_pk
primary key,
id INTEGER
constraint tags_torrents_id_fk
references torrents,
tag TEXT
)
|
[
"CASE WHEN",
"AS",
"AND",
"SELECT",
"SUM",
"LIKE",
"CASE",
"INNER JOIN",
"ON",
"CAST",
"COUNT",
"BETWEEN",
"FROM"
] | 17 |
challenging
|
{
"case_1": [
740
],
"case_2": [
26,
125,
403,
740,
907,
917
],
"case_3": [
26,
125,
403,
740,
907,
917
],
"case_4": [
26,
38,
125,
403,
421,
591,
598,
738,
740,
907,
917,
1018,
1117
],
"case_5": [
0,
4,
6,
16,
20,
22,
24,
26,
30,
37,
39,
42,
47,
51,
53,
57,
61,
63,
64,
68,
69,
71,
73,
74,
75,
76,
77,
81,
82,
88,
90,
93,
96,
98,
106,
112,
113,
115,
117,
118,
119,
120,
125,
126,
127,
129,
131,
141,
142,
143,
146,
148,
152,
153,
155,
158,
160,
164,
169,
170,
173,
175,
179,
183,
184,
187,
189,
191,
192,
195,
197,
201,
202,
207,
212,
214,
215,
219,
223,
225,
226,
227,
234,
236,
240,
244,
247,
248,
254,
256,
258,
261,
264,
267,
268,
271,
276,
277,
278,
279,
299,
300,
301,
304,
314,
315,
316,
317,
319,
322,
323,
325,
330,
335,
339,
341,
347,
356,
360,
370,
373,
374,
375,
382,
383,
391,
393,
398,
402,
403,
406,
409,
412,
415,
416,
417,
423,
424,
426,
427,
433,
436,
438,
444,
448,
451,
452,
453,
458,
463,
464,
469,
470,
476,
477,
478,
482,
483,
485,
486,
487,
488,
490,
493,
500,
504,
510,
514,
515,
516,
517,
518,
519,
520,
526,
528,
530,
532,
535,
537,
540,
544,
547,
550,
557,
558,
559,
560,
562,
563,
564,
571,
573,
575,
580,
581,
582,
595,
597,
608,
612,
613,
620,
623,
624,
627,
628,
630,
632,
633,
640,
641,
646,
658,
662,
663,
666,
668,
671,
675,
676,
677,
682,
686,
687,
690,
710,
712,
714,
723,
727,
734,
735,
739,
740,
743,
744,
747,
749,
750,
753,
754,
756,
760,
762,
768,
772,
776,
777,
787,
788,
795,
796,
797,
798,
799,
800,
802,
804,
808,
810,
813,
814,
819,
824,
825,
827,
830,
832,
838,
841,
844,
848,
849,
851,
853,
858,
867,
868,
870,
871,
874,
877,
879,
886,
888,
894,
896,
898,
902,
907,
909,
912,
917,
918,
922,
923,
924,
926,
930,
935,
943,
944,
954,
956,
958,
959,
961,
969,
985,
986,
996,
998,
1000,
1008,
1012,
1019,
1022,
1023,
1027,
1031,
1042,
1058,
1062,
1064,
1067,
1068,
1069,
1071,
1072,
1078,
1082,
1084,
1086,
1087,
1092,
1098,
1100,
1101,
1103,
1104,
1119,
1121,
1123,
1128,
1131,
1133,
1134,
1135
]
}
|
world_development_indicators
|
Among the countries in the group of Heavily Indebted Poor Countries, how many of them are under the lending category of the International Development Associations?
|
group of Heavily Indebted Poor Countries is OtherGroups = 'HIPC'; International Development Associations refers to lendingcategory = 'IDA'
|
SELECT COUNT(CountryCode) FROM Country WHERE LendingCategory = 'IDA' AND OtherGroups = 'HIPC'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,090 | 2,090 |
CREATE TABLE `Country`
(
CREATE TABLE "Country"
CountryCode TEXT not null
primary key,
LendingCategory TEXT,
OtherGroups TEXT
)
|
[
"COUNT",
"AND",
"SELECT",
"FROM"
] | 4 |
simple
|
{
"case_1": [
192,
692,
716,
1126
],
"case_2": [
192,
692,
716,
1126
],
"case_3": [
113,
192,
408,
439,
529,
557,
663,
692,
716,
763,
819,
861,
928,
1121,
1126
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
1,
2,
4,
5,
6,
8,
9,
10,
11,
12,
13,
15,
16,
19,
20,
21,
22,
24,
25,
26,
27,
28,
30,
32,
33,
35,
36,
37,
38,
39,
40,
43,
44,
45,
47,
50,
51,
52,
53,
55,
56,
57,
61,
62,
63,
66,
67,
68,
69,
71,
73,
74,
75,
76,
77,
78,
79,
82,
85,
86,
87,
88,
89,
90,
91,
93,
95,
96,
98,
99,
100,
106,
108,
109,
111,
112,
113,
115,
116,
117,
118,
119,
121,
124,
125,
126,
127,
128,
129,
131,
138,
140,
141,
142,
143,
144,
146,
147,
148,
152,
154,
157,
158,
159,
160,
163,
164,
167,
168,
169,
170,
172,
173,
175,
176,
177,
179,
180,
182,
183,
184,
185,
187,
188,
189,
190,
191,
192,
196,
197,
198,
199,
200,
202,
203,
206,
210,
212,
214,
216,
219,
223,
224,
225,
226,
227,
229,
230,
233,
234,
239,
240,
243,
244,
247,
252,
254,
255,
256,
258,
259,
261,
262,
265,
266,
267,
268,
269,
270,
271,
272,
273,
275,
276,
277,
278,
282,
286,
291,
293,
294,
296,
299,
301,
303,
305,
311,
314,
315,
316,
317,
319,
320,
323,
325,
330,
334,
335,
336,
338,
339,
341,
344,
345,
348,
349,
350,
352,
354,
356,
358,
359,
360,
361,
362,
364,
367,
368,
370,
371,
373,
374,
375,
376,
380,
382,
383,
384,
385,
391,
392,
393,
394,
395,
398,
399,
401,
402,
403,
405,
406,
408,
409,
410,
411,
412,
413,
414,
416,
417,
418,
419,
420,
421,
423,
424,
425,
426,
427,
428,
433,
436,
437,
438,
439,
440,
443,
444,
445,
446,
447,
448,
451,
452,
453,
454,
455,
458,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
473,
475,
476,
477,
478,
480,
481,
482,
484,
485,
487,
488,
490,
492,
493,
494,
496,
497,
498,
500,
504,
505,
507,
509,
510,
512,
514,
515,
516,
517,
519,
520,
522,
524,
526,
528,
529,
530,
531,
532,
533,
535,
536,
537,
538,
539,
541,
542,
543,
544,
545,
547,
548,
551,
552,
554,
557,
558,
559,
560,
561,
562,
563,
564,
566,
573,
580,
581,
582,
584,
585,
586,
588,
589,
591,
594,
595,
596,
597,
598,
599,
601,
603,
605,
606,
608,
610,
611,
612,
613,
615,
618,
620,
622,
624,
625,
626,
627,
629,
630,
632,
633,
634,
637,
641,
643,
645,
646,
648,
649,
651,
654,
656,
658,
659,
661,
662,
663,
664,
665,
666,
667,
668,
669,
671,
673,
675,
677,
678,
679,
680,
681,
683,
684,
685,
686,
687,
688,
689,
690,
692,
693,
694,
696,
697,
698,
699,
702,
703,
705,
707,
712,
714,
715,
716,
718,
719,
721,
726,
727,
730,
733,
734,
735,
736,
737,
739,
740,
741,
743,
746,
747,
748,
749,
750,
752,
753,
754,
756,
757,
758,
760,
762,
763,
765,
767,
768,
769,
770,
772,
773,
775,
776,
777,
778,
779,
780,
783,
785,
787,
788,
790,
793,
794,
795,
796,
797,
798,
799,
800,
802,
804,
806,
807,
808,
810,
811,
812,
813,
814,
817,
818,
819,
820,
821,
824,
825,
827,
829,
830,
831,
832,
835,
838,
839,
840,
841,
843,
844,
848,
849,
851,
853,
855,
857,
858,
859,
860,
861,
864,
865,
866,
867,
869,
870,
873,
874,
876,
877,
878,
879,
886,
888,
890,
892,
893,
894,
895,
896,
897,
898,
899,
901,
902,
903,
905,
907,
909,
911,
912,
913,
915,
917,
918,
920,
922,
923,
924,
926,
927,
928,
930,
931,
932,
934,
935,
941,
942,
943,
944,
945,
949,
950,
951,
953,
954,
956,
958,
960,
961,
963,
965,
968,
969,
972,
974,
975,
976,
977,
981,
983,
985,
986,
991,
993,
996,
998,
1000,
1001,
1005,
1006,
1008,
1009,
1010,
1011,
1013,
1014,
1015,
1017,
1018,
1019,
1020,
1022,
1023,
1027,
1030,
1031,
1037,
1039,
1042,
1043,
1044,
1046,
1047,
1050,
1051,
1053,
1055,
1057,
1058,
1059,
1061,
1062,
1063,
1064,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1084,
1086,
1087,
1090,
1092,
1094,
1096,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1112,
1113,
1115,
1117,
1119,
1121,
1123,
1124,
1126,
1127,
1128,
1131,
1133,
1134,
1135,
1136,
1137
]
}
|
world_development_indicators
|
Please list the countries under the lending category of the International Development Associations and have a external debt reporting finished by estimation.
|
countries refer to the ShortName; International Development Associations refers to lendingcategory = 'IDA'; have a external debt reporting finished by estimation refers to ExternalDebtReportingStatus = 'Estimate'
|
SELECT ShortName, ExternalDebtReportingStatus FROM Country WHERE LendingCategory = 'IDA'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,091 | 2,091 |
CREATE TABLE `Country`
(
ShortName TEXT,
LendingCategory TEXT,
ExternalDebtReportingStatus TEXT
)
|
[
"SELECT",
"FROM"
] | 2 |
simple
|
{
"case_1": [
192,
328,
553,
692,
716,
990,
1126
],
"case_2": [
192,
328,
553,
692,
716,
990,
1126
],
"case_3": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
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,
1001,
1002,
1003,
1004,
1005,
1006,
1007,
1008,
1009,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1018,
1019,
1020,
1021,
1022,
1023,
1024,
1025,
1026,
1027,
1028,
1029,
1030,
1031,
1032,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1040,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1048,
1049,
1050,
1051,
1052,
1053,
1054,
1055,
1056,
1057,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1073,
1074,
1075,
1076,
1077,
1078,
1079,
1080,
1081,
1082,
1083,
1084,
1085,
1086,
1087,
1088,
1089,
1090,
1091,
1092,
1093,
1094,
1095,
1096,
1097,
1098,
1099,
1100,
1101,
1102,
1103,
1104,
1105,
1106,
1107,
1108,
1109,
1110,
1111,
1112,
1113,
1114,
1115,
1116,
1117,
1118,
1119,
1120,
1121,
1122,
1123,
1124,
1125,
1126,
1127,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1138,
1139,
1140,
1141
]
}
|
world_development_indicators
|
What's the description of the series code SM.POP.TOTL for Aruba?
|
Aruba is the name of the country where ShortName = 'Aruba'
|
SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'SM.POP.TOTL'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,092 | 2,092 |
CREATE TABLE `Country`
(
CREATE TABLE "Country"
CountryCode TEXT not null
primary key,
ShortName TEXT
)
CREATE TABLE `CountryNotes`
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key Countrycode, Seriescode,
FOREIGN KEY Seriescode REFERENCES SeriesSeriesCode,
FOREIGN KEY Countrycode REFERENCES CountryCountryCode
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 7 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
113,
408,
521,
529,
557,
663,
763,
819,
861,
928,
988,
1099,
1121
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
world_development_indicators
|
Please list the countries in Latin America & Caribbean with a note on the series code SM.POP.TOTL.
|
Countries refer to the ShortName; Latin America & Caribbean is the name of the region
|
SELECT T1.SHORTNAME, T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Region = 'Latin America & Caribbean' AND T2.Seriescode = 'SM.POP.TOTL'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,093 | 2,093 |
CREATE TABLE `Country`
(
CREATE TABLE "Country"
CountryCode TEXT not null
primary key,
ShortName TEXT,
Region TEXT
)
CREATE TABLE `CountryNotes`
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key Countrycode, Seriescode,
FOREIGN KEY Seriescode REFERENCES SeriesSeriesCode,
FOREIGN KEY Countrycode REFERENCES CountryCountryCode
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 7 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
113,
408,
521,
529,
557,
663,
763,
819,
861,
928,
988,
1099,
1121
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
world_development_indicators
|
Among the countries with note on the series code SM.POP.TOTL, how many of them are in the low-income group?
|
countries refer to Countrycode; low-income group refers to incomegroup = 'Low income'; with notes refers to description IS NOT NULL; series code SM.POP.TOTL refers to Seriescode = 'SM.POP.TOTL'
|
SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Seriescode = 'SM.POP.TOTL' AND T1.IncomeGroup = 'Low income'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,094 | 2,094 |
CREATE TABLE `Country`
(
CREATE TABLE "Country"
CountryCode TEXT not null
primary key,
IncomeGroup TEXT
)
CREATE TABLE `CountryNotes`
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
primary key Countrycode, Seriescode,
FOREIGN KEY Seriescode REFERENCES SeriesSeriesCode,
FOREIGN KEY Countrycode REFERENCES CountryCountryCode
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 8 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
113,
192,
408,
521,
529,
557,
663,
692,
763,
819,
861,
928,
988,
1099,
1121,
1126
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
35,
36,
37,
39,
40,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
109,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
230,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
259,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
294,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
512,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
554,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
594,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
618,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
656,
657,
658,
659,
660,
661,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
680,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
692,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
707,
710,
711,
712,
714,
715,
717,
718,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
730,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
820,
822,
823,
824,
825,
827,
828,
829,
830,
831,
832,
833,
834,
835,
837,
838,
839,
841,
843,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
903,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
945,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
965,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1019,
1020,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1079,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1126,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
world_development_indicators
|
Please list the descriptions of the series code SM.POP.TOTL for all the countries that are under the lending category of the International Development Associations.
|
Countries are the Countrycode; International Development Associations refers to lendingcategory = 'IDA'
|
SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.LendingCategory = 'IDA' AND T2.Seriescode = 'SM.POP.TOTL'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,095 | 2,095 |
CREATE TABLE `Country`
(
CREATE TABLE "Country"
CountryCode TEXT not null
primary key,
LendingCategory TEXT
)
CREATE TABLE `CountryNotes`
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key Countrycode, Seriescode,
FOREIGN KEY Seriescode REFERENCES SeriesSeriesCode,
FOREIGN KEY Countrycode REFERENCES CountryCountryCode
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 7 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
113,
408,
521,
529,
557,
663,
763,
819,
861,
928,
988,
1099,
1121
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
world_development_indicators
|
How many low-income countries under the lending category of the International Development Associations have a note on the series code SM.POP.TOTL?
|
low-income countries are where the incomegroup = Low income
|
SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.LendingCategory = 'IDA' AND T2.Seriescode = 'SM.POP.TOTL' AND IncomeGroup = 'Low income'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,096 | 2,096 |
CREATE TABLE `Country`
(
CREATE TABLE "Country"
CountryCode TEXT not null
primary key,
IncomeGroup TEXT,
LendingCategory TEXT
)
CREATE TABLE `CountryNotes`
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
primary key Countrycode, Seriescode,
FOREIGN KEY Seriescode REFERENCES SeriesSeriesCode,
FOREIGN KEY Countrycode REFERENCES CountryCountryCode
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 9 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
113,
192,
408,
521,
529,
557,
663,
692,
763,
819,
861,
928,
988,
1099,
1121,
1126
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
35,
36,
37,
39,
40,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
109,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
230,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
259,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
294,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
512,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
554,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
594,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
618,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
656,
657,
658,
659,
660,
661,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
680,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
692,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
707,
710,
711,
712,
714,
715,
717,
718,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
730,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
820,
822,
823,
824,
825,
827,
828,
829,
830,
831,
832,
833,
834,
835,
837,
838,
839,
841,
843,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
903,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
945,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
965,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1019,
1020,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1079,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1126,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
world_development_indicators
|
Among the countries in the High income: OECD group whose currency unit is Euro, how many of them have a note on the series code SP.DYN.AMRT.FE?
|
countries refer to Countrycode; in the high income refers to incomegroup = 'High'; with notes refers to description IS NOT NULL; series code SP.DYN.AMRT.FE refers to Seriescode = 'SP.DYN.AMRT.FE'
|
SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.IncomeGroup = 'High income: OECD' AND T1.CurrencyUnit = 'Euro' AND T2.Seriescode = 'SP.DYN.AMRT.FE'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,097 | 2,097 |
CREATE TABLE `Country`
(
CREATE TABLE "Country"
CountryCode TEXT not null
primary key,
CurrencyUnit TEXT,
IncomeGroup TEXT
)
CREATE TABLE `CountryNotes`
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
primary key Countrycode, Seriescode,
FOREIGN KEY Seriescode REFERENCES SeriesSeriesCode,
FOREIGN KEY Countrycode REFERENCES CountryCountryCode
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"COUNT",
"FROM"
] | 9 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
113,
192,
408,
521,
529,
557,
663,
692,
763,
819,
861,
928,
988,
1099,
1121,
1126
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
32,
33,
34,
35,
36,
37,
39,
40,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
109,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
192,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
230,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
259,
260,
261,
262,
264,
265,
266,
267,
268,
269,
271,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
286,
287,
289,
290,
292,
294,
295,
296,
297,
298,
299,
300,
301,
302,
303,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
380,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
399,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
421,
422,
423,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
443,
444,
445,
446,
447,
448,
449,
450,
451,
452,
453,
454,
455,
456,
457,
458,
459,
460,
462,
463,
464,
465,
466,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
485,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
504,
505,
507,
509,
510,
511,
512,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
542,
544,
547,
548,
550,
552,
554,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
591,
592,
593,
594,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
618,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
656,
657,
658,
659,
660,
661,
662,
663,
665,
666,
667,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
680,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
692,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
707,
710,
711,
712,
714,
715,
717,
718,
719,
720,
721,
722,
723,
724,
725,
726,
727,
728,
730,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
795,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
817,
818,
819,
820,
822,
823,
824,
825,
827,
828,
829,
830,
831,
832,
833,
834,
835,
837,
838,
839,
841,
843,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
903,
904,
905,
907,
908,
909,
910,
911,
912,
913,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
945,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
965,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1019,
1020,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1059,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1069,
1070,
1071,
1072,
1074,
1078,
1079,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1113,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1126,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
world_development_indicators
|
What is the long name of the country with the description "Estimates are derived from data on foreign-born population." on the series code SM.POP.TOTL?
|
SELECT T1.LongName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Estimates are derived FROM data on foreign-born population.' AND T2.Seriescode = 'SM.POP.TOTL'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,098 | 2,098 |
CREATE TABLE `Country`
(
CREATE TABLE "Country"
CountryCode TEXT not null
primary key,
LongName TEXT
)
CREATE TABLE `CountryNotes`
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key Countrycode, Seriescode,
FOREIGN KEY Seriescode REFERENCES SeriesSeriesCode,
FOREIGN KEY Countrycode REFERENCES CountryCountryCode
)
|
[
"AS",
"AND",
"SELECT",
"on",
"-",
"INNER JOIN",
"ON",
"FROM"
] | 10 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
113,
408,
521,
529,
557,
663,
763,
819,
861,
928,
988,
1099
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
999,
1000,
1001,
1003,
1005,
1006,
1010,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
|
world_development_indicators
|
What is the description of the footnote on the series code AG.LND.FRST.K2 in 1990 for Aruba?
|
Year = 1990; Aruba is the name of country where ShortName = 'Aruba'
|
SELECT T2.Description FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'AG.LND.FRST.K2' AND T2.Year = 'YR1990'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,099 | 2,099 |
CREATE TABLE `Country`
(
CREATE TABLE "Country"
CountryCode TEXT not null
primary key,
ShortName TEXT
)
CREATE TABLE `Footnotes`
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key Countrycode, Seriescode, Year,
FOREIGN KEY Seriescode REFERENCES SeriesSeriesCode,
FOREIGN KEY Countrycode REFERENCES CountryCountryCode
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 8 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
113,
408,
521,
529,
557,
663,
763,
819,
861,
928,
988,
1099,
1121
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
world_development_indicators
|
On which years did Aruba got a footnote on the series code AG.LND.FRST.K2?
|
Aruba is the name of country where ShortName = 'Aruba'
|
SELECT T2.Year FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'AG.LND.FRST.K2'
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
|
CREATE TABLE "Country"
(
CountryCode TEXT not null
primary key,
ShortName TEXT,
TableName TEXT,
LongName TEXT,
Alpha2Code TEXT,
CurrencyUnit TEXT,
SpecialNotes TEXT,
Region TEXT,
IncomeGroup TEXT,
Wb2Code TEXT,
NationalAccountsBaseYear TEXT,
NationalAccountsReferenceYear TEXT,
SnaPriceValuation TEXT,
LendingCategory TEXT,
OtherGroups TEXT,
SystemOfNationalAccounts TEXT,
AlternativeConversionFactor TEXT,
PppSurveyYear TEXT,
BalanceOfPaymentsManualInUse TEXT,
ExternalDebtReportingStatus TEXT,
SystemOfTrade TEXT,
GovernmentAccountingConcept TEXT,
ImfDataDisseminationStandard TEXT,
LatestPopulationCensus TEXT,
LatestHouseholdSurvey TEXT,
SourceOfMostRecentIncomeAndExpenditureData TEXT,
VitalRegistrationComplete TEXT,
LatestAgriculturalCensus TEXT,
LatestIndustrialData INTEGER,
LatestTradeData INTEGER,
LatestWaterWithdrawalData INTEGER
)
CREATE TABLE "Series"
(
SeriesCode TEXT not null
primary key,
Topic TEXT,
IndicatorName TEXT,
ShortDefinition TEXT,
LongDefinition TEXT,
UnitOfMeasure TEXT,
Periodicity TEXT,
BasePeriod TEXT,
OtherNotes INTEGER,
AggregationMethod TEXT,
LimitationsAndExceptions TEXT,
NotesFromOriginalSource TEXT,
GeneralComments TEXT,
Source TEXT,
StatisticalConceptAndMethodology TEXT,
DevelopmentRelevance TEXT,
RelatedSourceLinks TEXT,
OtherWebLinks INTEGER,
RelatedIndicators INTEGER,
LicenseType TEXT
)
CREATE TABLE CountryNotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Description TEXT,
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Footnotes
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
Description TEXT,
primary key (Countrycode, Seriescode, Year),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode)
)
CREATE TABLE Indicators
(
CountryName TEXT,
CountryCode TEXT NOT NULL ,
IndicatorName TEXT,
IndicatorCode TEXT NOT NULL ,
Year INTEGER NOT NULL ,
Value INTEGER,
primary key (CountryCode, IndicatorCode, Year),
FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode)
)
CREATE TABLE SeriesNotes
(
Seriescode TEXT not null ,
Year TEXT not null ,
Description TEXT,
primary key (Seriescode, Year),
foreign key (Seriescode) references Series(SeriesCode)
)
|
na
| 2,100 | 2,100 |
CREATE TABLE `Country`
(
CREATE TABLE "Country"
CountryCode TEXT not null
primary key,
ShortName TEXT
)
CREATE TABLE `Footnotes`
(
Countrycode TEXT NOT NULL ,
Seriescode TEXT NOT NULL ,
Year TEXT,
primary key Countrycode, Seriescode, Year,
FOREIGN KEY Seriescode REFERENCES SeriesSeriesCode,
FOREIGN KEY Countrycode REFERENCES CountryCountryCode
)
|
[
"AS",
"AND",
"SELECT",
"INNER JOIN",
"ON",
"FROM"
] | 7 |
simple
|
{
"case_1": [
-1
],
"case_2": [
-1
],
"case_3": [
113,
408,
521,
529,
557,
663,
763,
819,
861,
928,
988,
1099,
1121
],
"case_4": [
113,
192,
328,
408,
439,
521,
529,
553,
557,
663,
692,
716,
763,
819,
861,
928,
988,
990,
1099,
1121,
1126
],
"case_5": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
10,
11,
12,
14,
16,
18,
19,
20,
21,
22,
23,
24,
26,
27,
29,
30,
33,
34,
36,
37,
39,
41,
42,
44,
45,
46,
47,
48,
49,
51,
52,
53,
55,
57,
58,
59,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
80,
81,
82,
83,
84,
85,
86,
88,
90,
91,
93,
94,
95,
96,
97,
98,
99,
101,
102,
105,
106,
107,
111,
112,
113,
115,
116,
117,
118,
119,
120,
121,
125,
126,
127,
128,
129,
130,
131,
132,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
148,
150,
151,
152,
153,
154,
155,
158,
159,
160,
162,
163,
164,
165,
166,
167,
169,
170,
171,
172,
175,
176,
177,
178,
179,
180,
183,
184,
186,
187,
188,
189,
190,
191,
194,
195,
196,
197,
199,
200,
201,
202,
206,
207,
211,
212,
213,
214,
217,
218,
219,
220,
221,
223,
225,
226,
227,
228,
229,
232,
233,
234,
235,
236,
239,
240,
241,
242,
243,
244,
246,
247,
248,
250,
254,
256,
257,
258,
260,
261,
262,
264,
265,
266,
267,
268,
269,
272,
275,
276,
277,
278,
279,
280,
281,
282,
284,
287,
289,
290,
292,
295,
296,
297,
298,
299,
300,
301,
302,
304,
305,
307,
308,
309,
311,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
322,
323,
324,
325,
329,
330,
333,
334,
335,
336,
338,
339,
340,
341,
342,
343,
344,
345,
346,
347,
349,
353,
354,
356,
357,
358,
360,
361,
363,
364,
365,
367,
368,
369,
370,
373,
374,
375,
376,
378,
379,
381,
382,
383,
384,
385,
386,
387,
388,
389,
390,
391,
392,
393,
394,
395,
398,
401,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
417,
419,
422,
424,
425,
426,
427,
428,
429,
430,
431,
432,
433,
434,
435,
436,
437,
438,
440,
441,
444,
445,
446,
447,
448,
449,
450,
451,
452,
454,
455,
456,
457,
459,
460,
462,
463,
464,
465,
467,
469,
470,
471,
472,
473,
474,
475,
476,
477,
478,
479,
480,
482,
483,
484,
486,
487,
488,
489,
490,
491,
493,
494,
495,
496,
497,
498,
499,
500,
501,
503,
505,
507,
509,
510,
511,
514,
515,
516,
518,
519,
520,
521,
522,
523,
524,
526,
528,
529,
530,
532,
533,
535,
536,
537,
538,
539,
540,
541,
544,
547,
548,
550,
552,
556,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
569,
570,
571,
572,
573,
574,
575,
577,
578,
579,
580,
581,
582,
584,
586,
587,
588,
589,
590,
592,
593,
595,
596,
597,
600,
601,
602,
605,
606,
607,
608,
609,
610,
611,
612,
613,
614,
615,
616,
620,
621,
623,
624,
625,
626,
627,
628,
630,
631,
632,
633,
634,
636,
637,
638,
639,
640,
641,
643,
644,
645,
646,
647,
648,
649,
650,
651,
652,
654,
655,
657,
658,
659,
660,
662,
663,
665,
666,
668,
669,
670,
671,
672,
674,
675,
676,
677,
678,
681,
682,
683,
684,
685,
686,
687,
688,
690,
691,
693,
694,
695,
696,
697,
699,
700,
701,
702,
704,
705,
706,
710,
711,
712,
714,
715,
717,
720,
721,
722,
723,
724,
725,
726,
727,
728,
733,
734,
735,
736,
739,
740,
741,
742,
743,
744,
745,
746,
747,
749,
750,
751,
752,
753,
754,
755,
756,
758,
759,
760,
761,
762,
763,
764,
765,
766,
767,
768,
769,
771,
772,
773,
774,
775,
776,
777,
778,
779,
780,
782,
783,
784,
786,
787,
788,
790,
792,
793,
796,
797,
798,
799,
800,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
818,
819,
822,
823,
824,
825,
827,
828,
829,
830,
832,
833,
834,
835,
837,
838,
839,
841,
844,
845,
846,
848,
849,
850,
851,
852,
853,
854,
857,
858,
859,
860,
861,
862,
863,
866,
867,
868,
870,
871,
873,
874,
875,
876,
877,
878,
879,
880,
881,
882,
885,
886,
887,
888,
889,
891,
892,
893,
894,
895,
896,
897,
898,
900,
901,
902,
904,
905,
907,
908,
909,
910,
911,
912,
914,
915,
916,
917,
918,
922,
923,
924,
925,
926,
927,
928,
930,
931,
932,
934,
935,
936,
937,
938,
940,
941,
943,
944,
949,
950,
951,
952,
953,
954,
956,
958,
959,
961,
962,
963,
964,
966,
967,
969,
970,
971,
973,
974,
975,
977,
980,
981,
985,
986,
988,
991,
993,
994,
996,
997,
998,
999,
1000,
1001,
1003,
1005,
1006,
1008,
1010,
1011,
1012,
1013,
1015,
1016,
1017,
1019,
1022,
1023,
1025,
1027,
1029,
1031,
1033,
1034,
1035,
1037,
1038,
1039,
1041,
1042,
1043,
1044,
1045,
1046,
1047,
1049,
1050,
1051,
1052,
1056,
1058,
1060,
1061,
1062,
1063,
1064,
1065,
1066,
1067,
1068,
1071,
1072,
1074,
1078,
1080,
1082,
1084,
1085,
1086,
1087,
1089,
1091,
1092,
1094,
1095,
1098,
1099,
1100,
1101,
1103,
1104,
1105,
1106,
1109,
1111,
1112,
1114,
1115,
1116,
1118,
1119,
1121,
1122,
1123,
1124,
1128,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137
]
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.