db_id
stringclasses
20 values
query
stringlengths
20
422
question
stringlengths
18
174
create_w_keys
stringclasses
20 values
create_wo_keys
stringclasses
20 values
difficulty
stringclasses
4 values
tvshow
SELECT Content FROM TV_Channel WHERE series_name = "Sky Radio";
What is the content of the series Sky Radio?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT Package_Option FROM TV_Channel WHERE series_name = "Sky Radio";
What is the Package Option of TV Channel with serial name "Sky Radio"?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT Package_Option FROM TV_Channel WHERE series_name = "Sky Radio";
What are the Package Options of the TV Channels whose series names are Sky Radio?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT count(*) FROM TV_Channel WHERE LANGUAGE = "English";
How many TV Channel using language English?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT count(*) FROM TV_Channel WHERE LANGUAGE = "English";
How many TV Channels use the English language?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;
List the language used least number of TV Channel. List language and number of TV Channel.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
hard
tvshow
SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;
What are the languages used by the least number of TV Channels and how many channels use it?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
hard
tvshow
SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE
List each language and the number of TV Channels using it.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE
For each language, list the number of TV Channels that use it.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = "The Rise of the Blue Beetle!";
What is the TV Channel that shows the cartoon "The Rise of the Blue Beetle!"? List the TV Channel's series name.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = "The Rise of the Blue Beetle!";
What is the series name of the TV Channel that shows the cartoon "The Rise of the Blue Beetle"?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio";
List the title of all Cartoons showed on TV Channel with series name "Sky Radio".
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio";
What is the title of all the cartools that are on the TV Channel with the series name "Sky Radio"?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT Episode FROM TV_series ORDER BY rating
List the Episode of all TV series sorted by rating.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT Episode FROM TV_series ORDER BY rating
What are all of the episodes ordered by ratings?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;
List top 3 highest Rating TV series. List the TV series's Episode and Rating.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;
What are 3 most highly rated episodes in the TV series table and what were those ratings?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT max(SHARE) , min(SHARE) FROM TV_series;
What is minimum and maximum share of TV series?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT max(SHARE) , min(SHARE) FROM TV_series;
What is the maximum and minimum share for the TV series?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime";
What is the air date of TV series with Episode "A Love of a Lifetime"?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime";
When did the episode "A Love of a Lifetime" air?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT Weekly_Rank FROM TV_series WHERE Episode = "A Love of a Lifetime";
What is Weekly Rank of TV series with Episode "A Love of a Lifetime"?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT Weekly_Rank FROM TV_series WHERE Episode = "A Love of a Lifetime";
What is the weekly rank for the episode "A Love of a Lifetime"?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = "A Love of a Lifetime";
What is the TV Channel of TV series with Episode "A Love of a Lifetime"? List the TV Channel's series name.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = "A Love of a Lifetime";
What is the name of the series that has the episode "A Love of a Lifetime"?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio";
List the Episode of all TV series showed on TV Channel with series name "Sky Radio".
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio";
What is the episode for the TV series named "Sky Radio"?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by
Find the number of cartoons directed by each of the listed directors.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by
How many cartoons did each director create?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
select production_code , channel from cartoon order by original_air_date desc limit 1
Find the production code and channel of the most recently aired cartoon .
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
select production_code , channel from cartoon order by original_air_date desc limit 1
What is the produdction code and channel of the most recent cartoon ?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = "yes"
Find the package choice and series name of the TV channel that has high definition TV.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = "yes"
What are the package options and the name of the series for the TV Channel that supports high definition TV?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
which countries' tv channels are playing some cartoon written by Todd Casey?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
What are the countries that have cartoons on TV that were written by Todd Casey?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
which countries' tv channels are not playing any cartoon written by Todd Casey?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
hard
tvshow
SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
What are the countries that are not playing cartoons written by Todd Casey?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
hard
tvshow
SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'
Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
extra
tvshow
SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'
What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
extra
tvshow
SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'
find the pixel aspect ratio and nation of the tv channels that do not use English.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'
What is the pixel aspect ratio and country of origin for all TV channels that do not use English?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
medium
tvshow
SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2
find id of the tv channels that from the countries where have more than two tv channels.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2
What are the ids of all tv channels that have more than 2 TV channels?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
easy
tvshow
SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'
find the id of tv channels that do not play any cartoon directed by Ben Jones.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
hard
tvshow
SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'
What are the ids of the TV channels that do not have any cartoons directed by Ben Jones?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
hard
tvshow
SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')
find the package option of the tv channel that do not have any cartoon directed by Ben Jones.
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
hard
tvshow
SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')
What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones?
CREATE TABLE IF NOT EXISTS "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 IF NOT EXISTS "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 IF NOT EXISTS "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); 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); CREATE TABLE Cartoon (id REAL, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code REAL, Channel TEXT);
hard
poker_player
SELECT count(*) FROM poker_player
How many poker players are there?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT count(*) FROM poker_player
Count the number of poker players.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT Earnings FROM poker_player ORDER BY Earnings DESC
List the earnings of poker players in descending order.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT Earnings FROM poker_player ORDER BY Earnings DESC
What are the earnings of poker players, ordered descending by value?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT Final_Table_Made , Best_Finish FROM poker_player
List the final tables made and the best finishes of poker players.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT Final_Table_Made , Best_Finish FROM poker_player
What are the final tables made and best finishes for all poker players?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT avg(Earnings) FROM poker_player
What is the average earnings of poker players?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT avg(Earnings) FROM poker_player
Return the average earnings across all poker players.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1
What is the money rank of the poker player with the highest earnings?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1
Return the money rank of the player with the greatest earnings.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000
What is the maximum number of final tables made among poker players with earnings less than 200000?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000
Return the maximum final tables made across all poker players who have earnings below 200000.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID
What are the names of poker players?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID
Return the names of all the poker players.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000
What are the names of poker players whose earnings is higher than 300000?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000
Give the names of poker players who have earnings above 300000.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made
List the names of poker players ordered by the final tables made in ascending order.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made
What are the names of poker players, ordered ascending by the number of final tables they have made?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1
What is the birth date of the poker player with the lowest earnings?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
poker_player
SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1
Return the birth date of the poker player with the lowest earnings.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
poker_player
SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1
What is the money rank of the tallest poker player?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
poker_player
SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1
Return the money rank of the poker player with the greatest height.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
poker_player
SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200
What is the average earnings of poker players with height higher than 200?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200
Give average earnings of poker players who are taller than 200.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC
What are the names of poker players in descending order of earnings?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC
Return the names of poker players sorted by their earnings descending.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality
What are different nationalities of people and the corresponding number of people from each nation?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality
How many people are there of each nationality?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
What is the most common nationality of people?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
poker_player
SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Give the nationality that is most common across all people.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
poker_player
SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2
What are the nationalities that are shared by at least two people?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2
Return the nationalities for which there are two or more people.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT Name , Birth_Date FROM people ORDER BY Name ASC
List the names and birth dates of people in ascending alphabetical order of name.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT Name , Birth_Date FROM people ORDER BY Name ASC
What are the names and birth dates of people, ordered by their names in alphabetical order?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
poker_player
SELECT Name FROM people WHERE Nationality != "Russia"
Show names of people whose nationality is not "Russia".
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT Name FROM people WHERE Nationality != "Russia"
What are the names of people who are not from Russia?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)
List the names of people that are not poker players.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
poker_player
SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)
What are the names of people who do not play poker?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
poker_player
SELECT count(DISTINCT Nationality) FROM people
How many distinct nationalities are there?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
poker_player
SELECT count(DISTINCT Nationality) FROM people
Count the number of different nationalities.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "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" int, "Nationality" text, "Name" text, "Birth_Date" text, "Height" real, PRIMARY KEY ("People_ID") );
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
voter_1
SELECT count(*) FROM area_code_state
How many states are there?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
easy
voter_1
SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC
List the contestant numbers and names, ordered by contestant name descending.
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
medium
voter_1
SELECT vote_id , phone_number , state FROM votes
List the vote ids, phone numbers and states of all votes.
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
medium
voter_1
SELECT max(area_code) , min(area_code) FROM area_code_state
What are the maximum and minimum values of area codes?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
medium
voter_1
SELECT max(created) FROM votes WHERE state = 'CA'
What is last date created of votes from the state 'CA'?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
easy
voter_1
SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'
What are the names of the contestants whose names are not 'Jessie Alloway'
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
easy
voter_1
SELECT DISTINCT state , created FROM votes
What are the distinct states and create time of all votes?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
medium
voter_1
SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2
What are the contestant numbers and names of the contestants who had at least two votes?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
medium
voter_1
SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1
Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
extra
voter_1
SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA'
What are the number of votes from state 'NY' or 'CA'?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
medium
voter_1
SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )
How many contestants did not get voted?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
extra
voter_1
SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1
What is the area code in which the most voters voted?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
extra
voter_1
SELECT T2.created , T2.state , T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling'
What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "contestant_number" INTEGER, "created" timestamp PRIMARY KEY ("vote_id"), FOREIGN KEY ("state") REFERENCES "AREA_CODE_STATE"("state"), FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number") );
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
medium