db_id
stringclasses 31
values | schema
stringclasses 22
values | schemaComEx
stringclasses 22
values | question
stringlengths 18
181
| query
stringlengths 20
577
| answer
stringlengths 14
41.7k
⌀ | complexity
stringclasses 4
values | distinct
bool 2
classes | like
bool 2
classes | between
bool 2
classes | order_by
bool 2
classes | limit
bool 2
classes | grouby_by
bool 2
classes | having
bool 2
classes | single_join
bool 2
classes | multiple_join
bool 2
classes | multiple_select
bool 2
classes | intersect
bool 2
classes | except
bool 2
classes | union
bool 2
classes |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What are the names of all cartoons directed by Ben Jones? | SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones"; | [{'Title': 'The Rise of the Blue Beetle!'}, {'Title': 'Day of the Dark Knight!'}, {'Title': 'Dawn of the Dead Man!'}, {'Title': 'The Eyes of Despero!'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | How many cartoons were written by "Joseph Kuhr"? | SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr"; | [{'count(*)': 2}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the number of cartoones written by Joseph Kuhr? | SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr"; | [{'count(*)': 2}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | list all cartoon titles and their directors ordered by their air date | SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date | [{'Title': 'Invasion of the Secret Santas!', 'Directed_by': 'Brandon Vietti'}, {'Title': 'Evil Under the Sea!', 'Directed_by': 'Michael Chang'}, {'Title': 'Return of the Fearsome Fangs!', 'Directed_by': 'Brandon Vietti'}, {'Title': 'Deep Cover for Batman!', 'Directed_by': 'Michael Chang'}, {'Title': 'The Eyes of Despero!', 'Directed_by': 'Ben Jones'}, {'Title': 'Dawn of the Dead Man!', 'Directed_by': 'Ben Jones'}, {'Title': 'Day of the Dark Knight!', 'Directed_by': 'Ben Jones'}, {'Title': 'Fall of the Blue Beetle!', 'Directed_by': 'Brandon Vietti'}, {'Title': 'Journey to the Center of the Bat!', 'Directed_by': 'Michael Chang'}, {'Title': 'Enter the Outsiders!', 'Directed_by': 'Michael Chang'}, {'Title': 'The Rise of the Blue Beetle!', 'Directed_by': 'Ben Jones'}, {'Title': 'Terror on Dinosaur Island!', 'Directed_by': 'Brandon Vietti'}] | Easy | false | false | false | true | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the name and directors of all the cartoons that are ordered by air date? | SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date | [{'Title': 'Invasion of the Secret Santas!', 'Directed_by': 'Brandon Vietti'}, {'Title': 'Evil Under the Sea!', 'Directed_by': 'Michael Chang'}, {'Title': 'Return of the Fearsome Fangs!', 'Directed_by': 'Brandon Vietti'}, {'Title': 'Deep Cover for Batman!', 'Directed_by': 'Michael Chang'}, {'Title': 'The Eyes of Despero!', 'Directed_by': 'Ben Jones'}, {'Title': 'Dawn of the Dead Man!', 'Directed_by': 'Ben Jones'}, {'Title': 'Day of the Dark Knight!', 'Directed_by': 'Ben Jones'}, {'Title': 'Fall of the Blue Beetle!', 'Directed_by': 'Brandon Vietti'}, {'Title': 'Journey to the Center of the Bat!', 'Directed_by': 'Michael Chang'}, {'Title': 'Enter the Outsiders!', 'Directed_by': 'Michael Chang'}, {'Title': 'The Rise of the Blue Beetle!', 'Directed_by': 'Ben Jones'}, {'Title': 'Terror on Dinosaur Island!', 'Directed_by': 'Brandon Vietti'}] | Easy | false | false | false | true | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | List the title of all cartoon directed by "Ben Jones" or "Brandon Vietti". | SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti"; | [{'Title': 'The Rise of the Blue Beetle!'}, {'Title': 'Terror on Dinosaur Island!'}, {'Title': 'Day of the Dark Knight!'}, {'Title': 'Invasion of the Secret Santas!'}, {'Title': 'Dawn of the Dead Man!'}, {'Title': 'Fall of the Blue Beetle!'}, {'Title': 'The Eyes of Despero!'}, {'Title': 'Return of the Fearsome Fangs!'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What are the titles of all cartoons directed by Ben Jones or Brandon Vietti? | SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti"; | [{'Title': 'The Rise of the Blue Beetle!'}, {'Title': 'Terror on Dinosaur Island!'}, {'Title': 'Day of the Dark Knight!'}, {'Title': 'Invasion of the Secret Santas!'}, {'Title': 'Dawn of the Dead Man!'}, {'Title': 'Fall of the Blue Beetle!'}, {'Title': 'The Eyes of Despero!'}, {'Title': 'Return of the Fearsome Fangs!'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | Which country has the most of TV Channels? List the country and number of TV Channels it has. | SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1; | [{'Country': 'Italy', 'count(*)': 12}] | Easy | false | false | false | true | true | true | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the country with the most number of TV Channels and how many does it have? | SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1; | [{'Country': 'Italy', 'count(*)': 12}] | Easy | false | false | false | true | true | true | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | List the number of different series names and contents in the TV Channel table. | SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel; | [{'count(DISTINCT series_name)': 15, 'count(DISTINCT content)': 1}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | How many different series and contents are listed in the TV Channel table? | SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel; | [{'count(DISTINCT series_name)': 15, 'count(DISTINCT content)': 1}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the content of TV Channel with serial name "Sky Radio"? | SELECT Content FROM TV_Channel WHERE series_name = "Sky Radio"; | [{'Content': 'music'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the content of the series Sky Radio? | SELECT Content FROM TV_Channel WHERE series_name = "Sky Radio"; | [{'Content': 'music'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the Package Option of TV Channel with serial name "Sky Radio"? | SELECT Package_Option FROM TV_Channel WHERE series_name = "Sky Radio"; | [{'Package_Option': 'Sky Famiglia'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What are the Package Options of the TV Channels whose series names are Sky Radio? | SELECT Package_Option FROM TV_Channel WHERE series_name = "Sky Radio"; | [{'Package_Option': 'Sky Famiglia'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | How many TV Channel using language English? | SELECT count(*) FROM TV_Channel WHERE LANGUAGE = "English"; | [{'count(*)': 3}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | How many TV Channels use the English language? | SELECT count(*) FROM TV_Channel WHERE LANGUAGE = "English"; | [{'count(*)': 3}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | List the language used least number of TV Channel. List language and number of TV Channel. | SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1; | [{'Language': 'English', 'count(*)': 3}] | Easy | false | false | false | true | true | true | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What are the languages used by the least number of TV Channels and how many channels use it? | SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1; | [{'Language': 'English', 'count(*)': 3}] | Easy | false | false | false | true | true | true | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | List each language and the number of TV Channels using it. | SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE | [{'Language': 'English', 'count(*)': 3}, {'Language': 'Italian', 'count(*)': 12}] | Easy | false | false | false | false | false | true | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | For each language, list the number of TV Channels that use it. | SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE | [{'Language': 'English', 'count(*)': 3}, {'Language': 'Italian', 'count(*)': 12}] | Easy | false | false | false | false | false | true | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | List the Episode of all TV series sorted by rating. | SELECT Episode FROM TV_series ORDER BY rating | [{'Episode': 'The Hanged Man'}, {'Episode': 'Double Down'}, {'Episode': 'Home By Another Way'}, {'Episode': 'Keepers'}, {'Episode': 'Emily'}, {'Episode': 'Blowback'}, {'Episode': 'The Legend of Dylan McCleen'}, {'Episode': 'Winterland'}, {'Episode': 'The Year of the Rabbit'}, {'Episode': 'Game Three'}, {'Episode': 'Friendly Skies'}, {'Episode': 'A Love of a Lifetime'}] | Easy | false | false | false | true | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What are all of the episodes ordered by ratings? | SELECT Episode FROM TV_series ORDER BY rating | [{'Episode': 'The Hanged Man'}, {'Episode': 'Double Down'}, {'Episode': 'Home By Another Way'}, {'Episode': 'Keepers'}, {'Episode': 'Emily'}, {'Episode': 'Blowback'}, {'Episode': 'The Legend of Dylan McCleen'}, {'Episode': 'Winterland'}, {'Episode': 'The Year of the Rabbit'}, {'Episode': 'Game Three'}, {'Episode': 'Friendly Skies'}, {'Episode': 'A Love of a Lifetime'}] | Easy | false | false | false | true | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | List top 3 highest Rating TV series. List the TV series's Episode and Rating. | SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3; | [{'Episode': 'A Love of a Lifetime', 'Rating': '5.8'}, {'Episode': 'Friendly Skies', 'Rating': '5.3'}, {'Episode': 'Game Three', 'Rating': '4.4'}] | Easy | false | false | false | true | true | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What are 3 most highly rated episodes in the TV series table and what were those ratings? | SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3; | [{'Episode': 'A Love of a Lifetime', 'Rating': '5.8'}, {'Episode': 'Friendly Skies', 'Rating': '5.3'}, {'Episode': 'Game Three', 'Rating': '4.4'}] | Easy | false | false | false | true | true | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is minimum and maximum share of TV series? | SELECT max(SHARE) , min(SHARE) FROM TV_series; | [{'max(SHARE)': 9.0, 'min(SHARE)': 5.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the maximum and minimum share for the TV series? | SELECT max(SHARE) , min(SHARE) FROM TV_series; | [{'max(SHARE)': 9.0, 'min(SHARE)': 5.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the air date of TV series with Episode "A Love of a Lifetime"? | SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime"; | [{'Air_Date': 'September 24, 2007'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | When did the episode "A Love of a Lifetime" air? | SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime"; | [{'Air_Date': 'September 24, 2007'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is Weekly Rank of TV series with Episode "A Love of a Lifetime"? | SELECT Weekly_Rank FROM TV_series WHERE Episode = "A Love of a Lifetime"; | [{'Weekly_Rank': 43.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the weekly rank for the episode "A Love of a Lifetime"? | SELECT Weekly_Rank FROM TV_series WHERE Episode = "A Love of a Lifetime"; | [{'Weekly_Rank': 43.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | Find the number of cartoons directed by each of the listed directors. | SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by | [{'count(*)': 4, 'Directed_by': 'Ben Jones'}, {'count(*)': 4, 'Directed_by': 'Brandon Vietti'}, {'count(*)': 4, 'Directed_by': 'Michael Chang'}] | Easy | false | false | false | false | false | true | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | How many cartoons did each director create? | SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by | [{'count(*)': 4, 'Directed_by': 'Ben Jones'}, {'count(*)': 4, 'Directed_by': 'Brandon Vietti'}, {'count(*)': 4, 'Directed_by': 'Michael Chang'}] | Easy | false | false | false | false | false | true | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | Find the production code and channel of the most recently aired cartoon . | SELECT production_code , channel FROM cartoon ORDER BY original_air_date DESC LIMIT 1 | [{'Production_code': 102.0, 'Channel': '701'}] | Easy | false | false | false | true | true | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the produdction code and channel of the most recent cartoon ? | SELECT production_code , channel FROM cartoon ORDER BY original_air_date DESC LIMIT 1 | [{'Production_code': 102.0, 'Channel': '701'}] | Easy | false | false | false | true | true | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | Find the package choice and series name of the TV channel that has high definition TV. | SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = "yes" | [{'Package_Option': 'Sky Famiglia + Sky HD', 'series_name': 'MTV Live HD'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What are the package options and the name of the series for the TV Channel that supports high definition TV? | SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = "yes" | [{'Package_Option': 'Sky Famiglia + Sky HD', 'series_name': 'MTV Live HD'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | find the pixel aspect ratio and nation of the tv channels that do not use English. | SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English' | [{'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3 / 16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3 / 16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3 / 16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What is the pixel aspect ratio and country of origin for all TV channels that do not use English? | SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English' | [{'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3 / 16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3 / 16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3 / 16:9', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}, {'Pixel_aspect_ratio_PAR': '4:3', 'Country': 'Italy'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | find id of the tv channels that from the countries where have more than two tv channels. | SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2 | [{'id': '700'}] | Easy | false | false | false | false | false | true | true | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What are the ids of all tv channels that have more than 2 TV channels? | SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2 | [{'id': '700'}] | Easy | false | false | false | false | false | true | true | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | find the package option of the tv channel that do not have any cartoon directed by Ben Jones. | SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones') | [{'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'no ( FTV )'}, {'Package_Option': 'Sky Famiglia + Sky HD'}, {'Package_Option': 'no ( FTV )'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
tvshow |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
) |
CREATE TABLE "Cartoon" (
id REAL,
"Title" TEXT,
"Directed_by" TEXT,
"Written_by" TEXT,
"Original_air_date" TEXT,
"Production_code" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from Cartoon table:
id Title Directed_by Written_by Original_air_date Production_code Channel
1.0 The Rise of the Blue Beetle! Ben Jones Michael Jelenic November14,2008 101.0 700
2.0 Terror on Dinosaur Island! Brandon Vietti Steven Melching November21,2008 102.0 701
*/
CREATE TABLE "TV_Channel" (
id TEXT,
series_name TEXT,
"Country" TEXT,
"Language" TEXT,
"Content" TEXT,
"Pixel_aspect_ratio_PAR" TEXT,
"Hight_definition_TV" TEXT,
"Pay_per_view_PPV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY (id)
)
/*
2 rows from TV_Channel table:
id series_name Country Language Content Pixel_aspect_ratio_PAR Hight_definition_TV Pay_per_view_PPV Package_Option
700 Sky Radio Italy Italian music 4:3 no no Sky Famiglia
701 Sky Music Italy Italian music 4:3 no no Sky Famiglia
*/
CREATE TABLE "TV_series" (
id REAL,
"Episode" TEXT,
"Air_Date" TEXT,
"Rating" TEXT,
"Share" REAL,
"18_49_Rating_Share" TEXT,
"Viewers_m" TEXT,
"Weekly_Rank" REAL,
"Channel" TEXT,
PRIMARY KEY (id),
FOREIGN KEY("Channel") REFERENCES "TV_Channel" (id)
)
/*
2 rows from TV_series table:
id Episode Air_Date Rating Share 18_49_Rating_Share Viewers_m Weekly_Rank Channel
1.0 A Love of a Lifetime September 24, 2007 5.8 9.0 3.5/9 9.16 43.0 700
2.0 Friendly Skies October 1, 2007 5.3 9.0 3.2/8 8.23 50.0 701
*/ | What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones? | SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones') | [{'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'no ( FTV )'}, {'Package_Option': 'Sky Famiglia + Sky HD'}, {'Package_Option': 'no ( FTV )'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}, {'Package_Option': 'Sky Famiglia'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | How many poker players are there? | SELECT count(*) FROM poker_player | [{'count(*)': 5}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | Count the number of poker players. | SELECT count(*) FROM poker_player | [{'count(*)': 5}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | List the earnings of poker players in descending order. | SELECT Earnings FROM poker_player ORDER BY Earnings DESC | [{'Earnings': 596462.0}, {'Earnings': 476090.0}, {'Earnings': 189233.0}, {'Earnings': 142800.0}, {'Earnings': 104871.0}] | Easy | false | false | false | true | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What are the earnings of poker players, ordered descending by value? | SELECT Earnings FROM poker_player ORDER BY Earnings DESC | [{'Earnings': 596462.0}, {'Earnings': 476090.0}, {'Earnings': 189233.0}, {'Earnings': 142800.0}, {'Earnings': 104871.0}] | Easy | false | false | false | true | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | List the final tables made and the best finishes of poker players. | SELECT Final_Table_Made , Best_Finish FROM poker_player | [{'Final_Table_Made': 42.0, 'Best_Finish': 1.0}, {'Final_Table_Made': 10.0, 'Best_Finish': 2.0}, {'Final_Table_Made': 21.0, 'Best_Finish': 1.0}, {'Final_Table_Made': 19.0, 'Best_Finish': 2.0}, {'Final_Table_Made': 26.0, 'Best_Finish': 3.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What are the final tables made and best finishes for all poker players? | SELECT Final_Table_Made , Best_Finish FROM poker_player | [{'Final_Table_Made': 42.0, 'Best_Finish': 1.0}, {'Final_Table_Made': 10.0, 'Best_Finish': 2.0}, {'Final_Table_Made': 21.0, 'Best_Finish': 1.0}, {'Final_Table_Made': 19.0, 'Best_Finish': 2.0}, {'Final_Table_Made': 26.0, 'Best_Finish': 3.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What is the average earnings of poker players? | SELECT avg(Earnings) FROM poker_player | [{'avg(Earnings)': 301891.2}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | Return the average earnings across all poker players. | SELECT avg(Earnings) FROM poker_player | [{'avg(Earnings)': 301891.2}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What is the money rank of the poker player with the highest earnings? | SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1 | [{'Money_Rank': 58.0}] | Easy | false | false | false | true | true | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | Return the money rank of the player with the greatest earnings. | SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1 | [{'Money_Rank': 58.0}] | Easy | false | false | false | true | true | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What is the maximum number of final tables made among poker players with earnings less than 200000? | SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000 | [{'max(Final_Table_Made)': 26.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | Return the maximum final tables made across all poker players who have earnings below 200000. | SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000 | [{'max(Final_Table_Made)': 26.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What are different nationalities of people and the corresponding number of people from each nation? | SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality | [{'Nationality': 'Bulgaria', 'COUNT(*)': 1}, {'Nationality': 'Russia', 'COUNT(*)': 6}] | Easy | false | false | false | false | false | true | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | How many people are there of each nationality? | SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality | [{'Nationality': 'Bulgaria', 'COUNT(*)': 1}, {'Nationality': 'Russia', 'COUNT(*)': 6}] | Easy | false | false | false | false | false | true | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What is the most common nationality of people? | SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 | [{'Nationality': 'Russia'}] | Easy | false | false | false | true | true | true | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | Give the nationality that is most common across all people. | SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 | [{'Nationality': 'Russia'}] | Easy | false | false | false | true | true | true | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What are the nationalities that are shared by at least two people? | SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2 | [{'Nationality': 'Russia'}] | Easy | false | false | false | false | false | true | true | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | Return the nationalities for which there are two or more people. | SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2 | [{'Nationality': 'Russia'}] | Easy | false | false | false | false | false | true | true | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | List the names and birth dates of people in ascending alphabetical order of name. | SELECT Name , Birth_Date FROM people ORDER BY Name ASC | [{'Name': 'Aleksey Ostapenko', 'Birth_Date': 'May 26, 1986'}, {'Name': 'Maksim Botin', 'Birth_Date': 'July 14, 1983'}, {'Name': 'Roman Bragin', 'Birth_Date': 'April 17, 1987'}, {'Name': 'Semen Poltavskiy', 'Birth_Date': 'February 8, 1981'}, {'Name': 'Sergey Grankin', 'Birth_Date': 'January 22, 1987'}, {'Name': 'Teodor Salparov', 'Birth_Date': 'August 16, 1982'}, {'Name': 'Yevgeni Sivozhelez', 'Birth_Date': 'August 8, 1986'}] | Easy | false | false | false | true | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What are the names and birth dates of people, ordered by their names in alphabetical order? | SELECT Name , Birth_Date FROM people ORDER BY Name ASC | [{'Name': 'Aleksey Ostapenko', 'Birth_Date': 'May 26, 1986'}, {'Name': 'Maksim Botin', 'Birth_Date': 'July 14, 1983'}, {'Name': 'Roman Bragin', 'Birth_Date': 'April 17, 1987'}, {'Name': 'Semen Poltavskiy', 'Birth_Date': 'February 8, 1981'}, {'Name': 'Sergey Grankin', 'Birth_Date': 'January 22, 1987'}, {'Name': 'Teodor Salparov', 'Birth_Date': 'August 16, 1982'}, {'Name': 'Yevgeni Sivozhelez', 'Birth_Date': 'August 8, 1986'}] | Easy | false | false | false | true | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | Show names of people whose nationality is not "Russia". | SELECT Name FROM people WHERE Nationality != "Russia" | [{'Name': 'Teodor Salparov'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What are the names of people who are not from Russia? | SELECT Name FROM people WHERE Nationality != "Russia" | [{'Name': 'Teodor Salparov'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | List the names of people that are not poker players. | SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player) | [{'Name': 'Roman Bragin'}, {'Name': 'Sergey Grankin'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | What are the names of people who do not play poker? | SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player) | [{'Name': 'Roman Bragin'}, {'Name': 'Sergey Grankin'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | How many distinct nationalities are there? | SELECT count(DISTINCT Nationality) FROM people | [{'count(DISTINCT Nationality)': 2}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
poker_player |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
) |
CREATE TABLE people (
"People_ID" INTEGER,
"Nationality" TEXT,
"Name" TEXT,
"Birth_Date" TEXT,
"Height" REAL,
PRIMARY KEY ("People_ID")
)
/*
2 rows from people table:
People_ID Nationality Name Birth_Date Height
1 Russia Aleksey Ostapenko May 26, 1986 207.0
2 Bulgaria Teodor Salparov August 16, 1982 182.0
*/
CREATE TABLE poker_player (
"Poker_Player_ID" INTEGER,
"People_ID" INTEGER,
"Final_Table_Made" REAL,
"Best_Finish" REAL,
"Money_Rank" REAL,
"Earnings" REAL,
PRIMARY KEY ("Poker_Player_ID"),
FOREIGN KEY("People_ID") REFERENCES people ("People_ID")
)
/*
2 rows from poker_player table:
Poker_Player_ID People_ID Final_Table_Made Best_Finish Money_Rank Earnings
1 1 42.0 1.0 68.0 476090.0
2 2 10.0 2.0 141.0 189233.0
*/ | Count the number of different nationalities. | SELECT count(DISTINCT Nationality) FROM people | [{'count(DISTINCT Nationality)': 2}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
voter_1 |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
) |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
/*
2 rows from AREA_CODE_STATE table:
area_code state
201 NJ
202 DC
*/
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
/*
2 rows from CONTESTANTS table:
contestant_number contestant_name
1 Edwina Burnam
2 Tabatha Gehling
*/
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
)
/*
2 rows from VOTES table:
vote_id phone_number state contestant_number created
1 7182887233 NY 2 2018-03-09 19:03:21
2 7148407040 NY 3 2018-03-09 19:03:36
*/ | How many states are there? | SELECT count(*) FROM area_code_state | [{'count(*)': 305}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
voter_1 |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
) |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
/*
2 rows from AREA_CODE_STATE table:
area_code state
201 NJ
202 DC
*/
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
/*
2 rows from CONTESTANTS table:
contestant_number contestant_name
1 Edwina Burnam
2 Tabatha Gehling
*/
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
)
/*
2 rows from VOTES table:
vote_id phone_number state contestant_number created
1 7182887233 NY 2 2018-03-09 19:03:21
2 7148407040 NY 3 2018-03-09 19:03:36
*/ | List the contestant numbers and names, ordered by contestant name descending. | SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC | [{'contestant_number': 2, 'contestant_name': 'Tabatha Gehling'}, {'contestant_number': 8, 'contestant_name': 'Nita Coster'}, {'contestant_number': 11, 'contestant_name': 'Loraine NygrenTania Mattioli'}, {'contestant_number': 9, 'contestant_name': 'Kurt Walser'}, {'contestant_number': 3, 'contestant_name': 'Kelly Clauss'}, {'contestant_number': 6, 'contestant_name': 'Jessie Eichman'}, {'contestant_number': 4, 'contestant_name': 'Jessie Alloway'}, {'contestant_number': 10, 'contestant_name': 'Ericka Dieter'}, {'contestant_number': 1, 'contestant_name': 'Edwina Burnam'}, {'contestant_number': 7, 'contestant_name': 'Allie Rogalski'}, {'contestant_number': 5, 'contestant_name': 'Alana Bregman'}] | Easy | false | false | false | true | false | false | false | false | false | false | false | false | false |
voter_1 |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
) |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
/*
2 rows from AREA_CODE_STATE table:
area_code state
201 NJ
202 DC
*/
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
/*
2 rows from CONTESTANTS table:
contestant_number contestant_name
1 Edwina Burnam
2 Tabatha Gehling
*/
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
)
/*
2 rows from VOTES table:
vote_id phone_number state contestant_number created
1 7182887233 NY 2 2018-03-09 19:03:21
2 7148407040 NY 3 2018-03-09 19:03:36
*/ | List the vote ids, phone numbers and states of all votes. | SELECT vote_id , phone_number , state FROM votes | [{'vote_id': 1, 'phone_number': 7182887233, 'state': 'NY'}, {'vote_id': 2, 'phone_number': 7148407040, 'state': 'NY'}, {'vote_id': 3, 'phone_number': 6209222712, 'state': 'CA'}, {'vote_id': 5, 'phone_number': 5112677315, 'state': 'NJ\n'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
voter_1 |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
) |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
/*
2 rows from AREA_CODE_STATE table:
area_code state
201 NJ
202 DC
*/
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
/*
2 rows from CONTESTANTS table:
contestant_number contestant_name
1 Edwina Burnam
2 Tabatha Gehling
*/
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
)
/*
2 rows from VOTES table:
vote_id phone_number state contestant_number created
1 7182887233 NY 2 2018-03-09 19:03:21
2 7148407040 NY 3 2018-03-09 19:03:36
*/ | What are the maximum and minimum values of area codes? | SELECT max(area_code) , min(area_code) FROM area_code_state | [{'max(area_code)': 989, 'min(area_code)': 201}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
voter_1 |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
) |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
/*
2 rows from AREA_CODE_STATE table:
area_code state
201 NJ
202 DC
*/
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
/*
2 rows from CONTESTANTS table:
contestant_number contestant_name
1 Edwina Burnam
2 Tabatha Gehling
*/
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
)
/*
2 rows from VOTES table:
vote_id phone_number state contestant_number created
1 7182887233 NY 2 2018-03-09 19:03:21
2 7148407040 NY 3 2018-03-09 19:03:36
*/ | What is last date created of votes from the state 'CA'? | SELECT max(created) FROM votes WHERE state = 'CA' | [{'max(created)': '2018-03-09 19:03:39'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
voter_1 |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
) |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
/*
2 rows from AREA_CODE_STATE table:
area_code state
201 NJ
202 DC
*/
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
/*
2 rows from CONTESTANTS table:
contestant_number contestant_name
1 Edwina Burnam
2 Tabatha Gehling
*/
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
)
/*
2 rows from VOTES table:
vote_id phone_number state contestant_number created
1 7182887233 NY 2 2018-03-09 19:03:21
2 7148407040 NY 3 2018-03-09 19:03:36
*/ | What are the names of the contestants whose names are not 'Jessie Alloway' | SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway' | [{'contestant_name': 'Edwina Burnam'}, {'contestant_name': 'Tabatha Gehling'}, {'contestant_name': 'Kelly Clauss'}, {'contestant_name': 'Alana Bregman'}, {'contestant_name': 'Jessie Eichman'}, {'contestant_name': 'Allie Rogalski'}, {'contestant_name': 'Nita Coster'}, {'contestant_name': 'Kurt Walser'}, {'contestant_name': 'Ericka Dieter'}, {'contestant_name': 'Loraine NygrenTania Mattioli'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
voter_1 |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
) |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
/*
2 rows from AREA_CODE_STATE table:
area_code state
201 NJ
202 DC
*/
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
/*
2 rows from CONTESTANTS table:
contestant_number contestant_name
1 Edwina Burnam
2 Tabatha Gehling
*/
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
)
/*
2 rows from VOTES table:
vote_id phone_number state contestant_number created
1 7182887233 NY 2 2018-03-09 19:03:21
2 7148407040 NY 3 2018-03-09 19:03:36
*/ | What are the distinct states and create time of all votes? | SELECT DISTINCT state , created FROM votes | [{'state': 'NY', 'created': '2018-03-09 19:03:21'}, {'state': 'NY', 'created': '2018-03-09 19:03:36'}, {'state': 'CA', 'created': '2018-03-09 19:03:39'}, {'state': 'NJ\n', 'created': '2018-03-09 19:03:40'}] | Easy | true | false | false | false | false | false | false | false | false | false | false | false | false |
voter_1 |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
) |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
/*
2 rows from AREA_CODE_STATE table:
area_code state
201 NJ
202 DC
*/
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
/*
2 rows from CONTESTANTS table:
contestant_number contestant_name
1 Edwina Burnam
2 Tabatha Gehling
*/
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
)
/*
2 rows from VOTES table:
vote_id phone_number state contestant_number created
1 7182887233 NY 2 2018-03-09 19:03:21
2 7148407040 NY 3 2018-03-09 19:03:36
*/ | What are the number of votes from state 'NY' or 'CA'? | SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA' | [{'count(*)': 3}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
voter_1 |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
) |
CREATE TABLE "AREA_CODE_STATE" (
area_code INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
PRIMARY KEY (area_code)
)
/*
2 rows from AREA_CODE_STATE table:
area_code state
201 NJ
202 DC
*/
CREATE TABLE "CONTESTANTS" (
contestant_number INTEGER,
contestant_name VARCHAR(50) NOT NULL,
PRIMARY KEY (contestant_number)
)
/*
2 rows from CONTESTANTS table:
contestant_number contestant_name
1 Edwina Burnam
2 Tabatha Gehling
*/
CREATE TABLE "VOTES" (
vote_id INTEGER NOT NULL,
phone_number INTEGER NOT NULL,
state VARCHAR(2) NOT NULL,
contestant_number INTEGER NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY(contestant_number) REFERENCES "CONTESTANTS" (contestant_number),
FOREIGN KEY(state) REFERENCES "AREA_CODE_STATE" (state)
)
/*
2 rows from VOTES table:
vote_id phone_number state contestant_number created
1 7182887233 NY 2 2018-03-09 19:03:21
2 7148407040 NY 3 2018-03-09 19:03:36
*/ | Return the names of the contestants whose names contain the substring 'Al' . | SELECT contestant_name FROM contestants WHERE contestant_name like "%al%" | [{'contestant_name': 'Jessie Alloway'}, {'contestant_name': 'Alana Bregman'}, {'contestant_name': 'Allie Rogalski'}, {'contestant_name': 'Kurt Walser'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What are the names of all the countries that became independent after 1950? | SELECT Name FROM country WHERE IndepYear > 1950 | [{'Name': 'Angola'}, {'Name': 'United Arab Emirates'}, {'Name': 'Armenia'}, {'Name': 'Antigua and Barbuda'}, {'Name': 'Azerbaijan'}, {'Name': 'Burundi'}, {'Name': 'Benin'}, {'Name': 'Burkina Faso'}, {'Name': 'Bangladesh'}, {'Name': 'Bahrain'}, {'Name': 'Bahamas'}, {'Name': 'Bosnia and Herzegovina'}, {'Name': 'Belarus'}, {'Name': 'Belize'}, {'Name': 'Barbados'}, {'Name': 'Brunei'}, {'Name': 'Botswana'}, {'Name': 'Central African Republic'}, {'Name': 'Côte d’Ivoire'}, {'Name': 'Cameroon'}, {'Name': 'Congo, The Democratic Republic of the'}, {'Name': 'Congo'}, {'Name': 'Comoros'}, {'Name': 'Cape Verde'}, {'Name': 'Cyprus'}, {'Name': 'Czech Republic'}, {'Name': 'Germany'}, {'Name': 'Djibouti'}, {'Name': 'Dominica'}, {'Name': 'Algeria'}, {'Name': 'Eritrea'}, {'Name': 'Estonia'}, {'Name': 'Fiji Islands'}, {'Name': 'Micronesia, Federated States of'}, {'Name': 'Gabon'}, {'Name': 'Georgia'}, {'Name': 'Ghana'}, {'Name': 'Guinea'}, {'Name': 'Gambia'}, {'Name': 'Guinea-Bissau'}, {'Name': 'Equatorial Guinea'}, {'Name': 'Grenada'}, {'Name': 'Guyana'}, {'Name': 'Croatia'}, {'Name': 'Jamaica'}, {'Name': 'Kazakstan'}, {'Name': 'Kenya'}, {'Name': 'Kyrgyzstan'}, {'Name': 'Cambodia'}, {'Name': 'Kiribati'}, {'Name': 'Saint Kitts and Nevis'}, {'Name': 'Kuwait'}, {'Name': 'Laos'}, {'Name': 'Libyan Arab Jamahiriya'}, {'Name': 'Saint Lucia'}, {'Name': 'Lesotho'}, {'Name': 'Lithuania'}, {'Name': 'Latvia'}, {'Name': 'Morocco'}, {'Name': 'Moldova'}, {'Name': 'Madagascar'}, {'Name': 'Maldives'}, {'Name': 'Marshall Islands'}, {'Name': 'Macedonia'}, {'Name': 'Mali'}, {'Name': 'Malta'}, {'Name': 'Mozambique'}, {'Name': 'Mauritania'}, {'Name': 'Mauritius'}, {'Name': 'Malawi'}, {'Name': 'Malaysia'}, {'Name': 'Namibia'}, {'Name': 'Niger'}, {'Name': 'Nigeria'}, {'Name': 'Nauru'}, {'Name': 'Oman'}, {'Name': 'Palau'}, {'Name': 'Papua New Guinea'}, {'Name': 'Qatar'}, {'Name': 'Russian Federation'}, {'Name': 'Rwanda'}, {'Name': 'Sudan'}, {'Name': 'Senegal'}, {'Name': 'Singapore'}, {'Name': 'Solomon Islands'}, {'Name': 'Sierra Leone'}, {'Name': 'Somalia'}, {'Name': 'Sao Tome and Principe'}, {'Name': 'Suriname'}, {'Name': 'Slovakia'}, {'Name': 'Slovenia'}, {'Name': 'Swaziland'}, {'Name': 'Seychelles'}, {'Name': 'Chad'}, {'Name': 'Togo'}, {'Name': 'Tajikistan'}, {'Name': 'Turkmenistan'}, {'Name': 'Tonga'}, {'Name': 'Trinidad and Tobago'}, {'Name': 'Tunisia'}, {'Name': 'Tuvalu'}, {'Name': 'Tanzania'}, {'Name': 'Uganda'}, {'Name': 'Ukraine'}, {'Name': 'Uzbekistan'}, {'Name': 'Saint Vincent and the Grenadines'}, {'Name': 'Vanuatu'}, {'Name': 'Samoa'}, {'Name': 'Zambia'}, {'Name': 'Zimbabwe'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | Give the names of the nations that were founded after 1950. | SELECT Name FROM country WHERE IndepYear > 1950 | [{'Name': 'Angola'}, {'Name': 'United Arab Emirates'}, {'Name': 'Armenia'}, {'Name': 'Antigua and Barbuda'}, {'Name': 'Azerbaijan'}, {'Name': 'Burundi'}, {'Name': 'Benin'}, {'Name': 'Burkina Faso'}, {'Name': 'Bangladesh'}, {'Name': 'Bahrain'}, {'Name': 'Bahamas'}, {'Name': 'Bosnia and Herzegovina'}, {'Name': 'Belarus'}, {'Name': 'Belize'}, {'Name': 'Barbados'}, {'Name': 'Brunei'}, {'Name': 'Botswana'}, {'Name': 'Central African Republic'}, {'Name': 'Côte d’Ivoire'}, {'Name': 'Cameroon'}, {'Name': 'Congo, The Democratic Republic of the'}, {'Name': 'Congo'}, {'Name': 'Comoros'}, {'Name': 'Cape Verde'}, {'Name': 'Cyprus'}, {'Name': 'Czech Republic'}, {'Name': 'Germany'}, {'Name': 'Djibouti'}, {'Name': 'Dominica'}, {'Name': 'Algeria'}, {'Name': 'Eritrea'}, {'Name': 'Estonia'}, {'Name': 'Fiji Islands'}, {'Name': 'Micronesia, Federated States of'}, {'Name': 'Gabon'}, {'Name': 'Georgia'}, {'Name': 'Ghana'}, {'Name': 'Guinea'}, {'Name': 'Gambia'}, {'Name': 'Guinea-Bissau'}, {'Name': 'Equatorial Guinea'}, {'Name': 'Grenada'}, {'Name': 'Guyana'}, {'Name': 'Croatia'}, {'Name': 'Jamaica'}, {'Name': 'Kazakstan'}, {'Name': 'Kenya'}, {'Name': 'Kyrgyzstan'}, {'Name': 'Cambodia'}, {'Name': 'Kiribati'}, {'Name': 'Saint Kitts and Nevis'}, {'Name': 'Kuwait'}, {'Name': 'Laos'}, {'Name': 'Libyan Arab Jamahiriya'}, {'Name': 'Saint Lucia'}, {'Name': 'Lesotho'}, {'Name': 'Lithuania'}, {'Name': 'Latvia'}, {'Name': 'Morocco'}, {'Name': 'Moldova'}, {'Name': 'Madagascar'}, {'Name': 'Maldives'}, {'Name': 'Marshall Islands'}, {'Name': 'Macedonia'}, {'Name': 'Mali'}, {'Name': 'Malta'}, {'Name': 'Mozambique'}, {'Name': 'Mauritania'}, {'Name': 'Mauritius'}, {'Name': 'Malawi'}, {'Name': 'Malaysia'}, {'Name': 'Namibia'}, {'Name': 'Niger'}, {'Name': 'Nigeria'}, {'Name': 'Nauru'}, {'Name': 'Oman'}, {'Name': 'Palau'}, {'Name': 'Papua New Guinea'}, {'Name': 'Qatar'}, {'Name': 'Russian Federation'}, {'Name': 'Rwanda'}, {'Name': 'Sudan'}, {'Name': 'Senegal'}, {'Name': 'Singapore'}, {'Name': 'Solomon Islands'}, {'Name': 'Sierra Leone'}, {'Name': 'Somalia'}, {'Name': 'Sao Tome and Principe'}, {'Name': 'Suriname'}, {'Name': 'Slovakia'}, {'Name': 'Slovenia'}, {'Name': 'Swaziland'}, {'Name': 'Seychelles'}, {'Name': 'Chad'}, {'Name': 'Togo'}, {'Name': 'Tajikistan'}, {'Name': 'Turkmenistan'}, {'Name': 'Tonga'}, {'Name': 'Trinidad and Tobago'}, {'Name': 'Tunisia'}, {'Name': 'Tuvalu'}, {'Name': 'Tanzania'}, {'Name': 'Uganda'}, {'Name': 'Ukraine'}, {'Name': 'Uzbekistan'}, {'Name': 'Saint Vincent and the Grenadines'}, {'Name': 'Vanuatu'}, {'Name': 'Samoa'}, {'Name': 'Zambia'}, {'Name': 'Zimbabwe'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | How many countries have a republic as their form of government? | SELECT count(*) FROM country WHERE GovernmentForm = "Republic" | [{'count(*)': 122}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | How many countries have governments that are republics? | SELECT count(*) FROM country WHERE GovernmentForm = "Republic" | [{'count(*)': 122}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What is the total surface area of the countries in the Caribbean region? | SELECT sum(SurfaceArea) FROM country WHERE Region = "Caribbean" | [{'sum(SurfaceArea)': 234423.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | How much surface area do the countires in the Carribean cover together? | SELECT sum(SurfaceArea) FROM country WHERE Region = "Caribbean" | [{'sum(SurfaceArea)': 234423.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | Which continent is Anguilla in? | SELECT Continent FROM country WHERE Name = "Anguilla" | [{'Continent': 'North America'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What is the continent name which Anguilla belongs to? | SELECT Continent FROM country WHERE Name = "Anguilla" | [{'Continent': 'North America'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What are the population and life expectancies in Brazil? | SELECT Population , LifeExpectancy FROM country WHERE Name = "Brazil" | [{'Population': 170115000, 'LifeExpectancy': 62.9}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | Give me Brazil’s population and life expectancies. | SELECT Population , LifeExpectancy FROM country WHERE Name = "Brazil" | [{'Population': 170115000, 'LifeExpectancy': 62.9}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What are the region and population of Angola? | SELECT Population , Region FROM country WHERE Name = "Angola" | [{'Population': 12878000, 'Region': 'Central Africa'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What region does Angola belong to and what is its population? | SELECT Population , Region FROM country WHERE Name = "Angola" | [{'Population': 12878000, 'Region': 'Central Africa'}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What is the average expected life expectancy for countries in the region of Central Africa? | SELECT avg(LifeExpectancy) FROM country WHERE Region = "Central Africa" | [{'avg(LifeExpectancy)': 50.31111111111111}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | How long is the people’s average life expectancy in Central Africa? | SELECT avg(LifeExpectancy) FROM country WHERE Region = "Central Africa" | [{'avg(LifeExpectancy)': 50.31111111111111}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What is the name of country that has the shortest life expectancy in Asia? | SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1 | [{'Name': 'Afghanistan'}] | Easy | false | false | false | true | true | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | Give the name of the country in Asia with the lowest life expectancy. | SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1 | [{'Name': 'Afghanistan'}] | Easy | false | false | false | true | true | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What is the total population and maximum GNP in Asia? | SELECT sum(Population) , max(GNP) FROM country WHERE Continent = "Asia" | [{'sum(Population)': 3705025700, 'max(GNP)': 3787042.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | How many people live in Asia, and what is the largest GNP among them? | SELECT sum(Population) , max(GNP) FROM country WHERE Continent = "Asia" | [{'sum(Population)': 3705025700, 'max(GNP)': 3787042.0}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What is the average life expectancy in African countries that are republics? | SELECT avg(LifeExpectancy) FROM country WHERE Continent = "Africa" AND GovernmentForm = "Republic" | [{'avg(LifeExpectancy)': 50.84347826086956}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | Give the average life expectancy for countries in Africa which are republics? | SELECT avg(LifeExpectancy) FROM country WHERE Continent = "Africa" AND GovernmentForm = "Republic" | [{'avg(LifeExpectancy)': 50.84347826086956}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | What is the total surface area of the continents Asia and Europe? | SELECT sum(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe" | [{'sum(SurfaceArea)': 54930138.9}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |
world_1 |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
) |
CREATE TABLE city (
"ID" INTEGER NOT NULL,
"Name" CHAR(35) DEFAULT '' NOT NULL,
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"District" CHAR(20) DEFAULT '' NOT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
PRIMARY KEY ("ID"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from city table:
ID Name CountryCode District Population
1 Kabul AFG Kabol 1780000
2 Qandahar AFG Qandahar 237500
*/
CREATE TABLE country (
"Code" CHAR(3) DEFAULT '' NOT NULL,
"Name" CHAR(52) DEFAULT '' NOT NULL,
"Continent" TEXT DEFAULT 'Asia' NOT NULL,
"Region" CHAR(26) DEFAULT '' NOT NULL,
"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL,
"IndepYear" INTEGER DEFAULT NULL,
"Population" INTEGER DEFAULT '0' NOT NULL,
"LifeExpectancy" FLOAT DEFAULT NULL,
"GNP" FLOAT DEFAULT NULL,
"GNPOld" FLOAT DEFAULT NULL,
"LocalName" CHAR(45) DEFAULT '' NOT NULL,
"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL,
"HeadOfState" CHAR(60) DEFAULT NULL,
"Capital" INTEGER DEFAULT NULL,
"Code2" CHAR(2) DEFAULT '' NOT NULL,
PRIMARY KEY ("Code")
)
/*
2 rows from country table:
Code Name Continent Region SurfaceArea IndepYear Population LifeExpectancy GNP GNPOld LocalName GovernmentForm HeadOfState Capital Code2
ABW Aruba North America Caribbean 193.0000000000 None 103000 78.4000000000 828.0000000000 793.0000000000 Aruba Nonmetropolitan Territory of The Netherlands Beatrix 129 AW
AFG Afghanistan Asia Southern and Central Asia 652090.0000000000 1919 22720000 45.9000000000 5976.0000000000 None Afganistan/Afqanestan Islamic Emirate Mohammad Omar 1 AF
*/
CREATE TABLE countrylanguage (
"CountryCode" CHAR(3) DEFAULT '' NOT NULL,
"Language" CHAR(30) DEFAULT '' NOT NULL,
"IsOfficial" TEXT DEFAULT 'F' NOT NULL,
"Percentage" FLOAT DEFAULT '0.0' NOT NULL,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)
/*
2 rows from countrylanguage table:
CountryCode Language IsOfficial Percentage
ABW Dutch T 5.3000000000
ABW English F 9.5000000000
*/ | Give the total surface area covered by countries in Asia or Europe. | SELECT sum(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe" | [{'sum(SurfaceArea)': 54930138.9}] | Easy | false | false | false | false | false | false | false | false | false | false | false | false | false |