column_names: -1
*
0
id
0
series name
0
country
0
language
0
content
0
pixel aspect ratio par
0
hight definition tv
0
pay per view ppv
0
package option
1
id
1
episode
1
air date
1
rating
1
share
1
18 49 rating share
1
viewers m
1
weekly rank
1
channel
2
id
2
title
2
directed by
2
written by
2
original air date
2
production code
2
channel
column_names_original: -1
*
0
id
0
series_name
0
Country
0
Language
0
Content
0
Pixel_aspect_ratio_PAR
0
Hight_definition_TV
0
Pay_per_view_PPV
0
Package_Option
1
id
1
Episode
1
Air_Date
1
Rating
1
Share
1
18_49_Rating_Share
1
Viewers_m
1
Weekly_Rank
1
Channel
2
id
2
Title
2
Directed_by
2
Written_by
2
Original_air_date
2
Production_code
2
Channel
column_types: text
text
text
text
text
text
text
text
text
text
number
text
text
text
number
text
text
number
text
number
text
text
text
text
number
text
db_id: tvshow
table_names: tv channel
tv series
cartoon
table_names_original: TV_Channel
TV_series
Cartoon

List the title of all cartoons in alphabetical order.
SELECT Title FROM Cartoon ORDER BY title

What are the titles of the cartoons sorted alphabetically?
SELECT Title FROM Cartoon ORDER BY title

List all cartoon directed by "Ben Jones".
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones";

What are the names of all cartoons directed by Ben Jones?
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones";

How many cartoons were written by "Joseph Kuhr"?
SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr";

What is the number of cartoones written by Joseph Kuhr?
SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr";

list all cartoon titles and their directors ordered by their air date
SELECT title ,  Directed_by FROM Cartoon ORDER BY Original_air_date

What is the name and directors of all the cartoons that are ordered by air date?
SELECT title ,  Directed_by FROM Cartoon ORDER BY Original_air_date

List the title of all cartoon directed by "Ben Jones" or "Brandon Vietti".
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti";

What are the titles of all cartoons directed by Ben Jones or Brandon Vietti?
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti";

Which country has the most of TV Channels? List the country and number of TV Channels it has.
SELECT Country ,  count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;

What is the country with the most number of TV Channels and how many does it have?
SELECT Country ,  count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;

List the number of different series names and contents in the TV Channel table.
SELECT count(DISTINCT series_name) ,  count(DISTINCT content) FROM TV_Channel;

How many different series and contents are listed in the TV Channel table?
SELECT count(DISTINCT series_name) ,  count(DISTINCT content) FROM TV_Channel;

What is the content of TV Channel with serial name "Sky Radio"?
SELECT Content FROM TV_Channel WHERE series_name = "Sky Radio";

What is the content of the series Sky Radio?
SELECT Content FROM TV_Channel WHERE series_name = "Sky Radio";

What is the Package Option of TV Channel with serial name "Sky Radio"?
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?
SELECT Package_Option FROM TV_Channel WHERE series_name = "Sky Radio";

How many TV Channel using language English?
SELECT count(*) FROM TV_Channel WHERE LANGUAGE = "English";

How many TV Channels use the English language?
SELECT count(*) FROM TV_Channel WHERE LANGUAGE = "English";

List the language used least number of TV Channel. List language and number of TV Channel.
SELECT LANGUAGE ,  count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;

What are the languages used by the least number of TV Channels and how many channels use it?
SELECT LANGUAGE ,  count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;

List each language and the number of TV Channels using it.
SELECT LANGUAGE ,  count(*) FROM TV_Channel GROUP BY LANGUAGE

For each language, list the number of TV Channels that use it.
SELECT LANGUAGE ,  count(*) FROM TV_Channel GROUP BY LANGUAGE

What is the TV Channel that shows the cartoon "The Rise of the Blue Beetle!"? List the TV Channel's series name.
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"?
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!";

List the title of all  Cartoons showed on TV Channel with series name "Sky Radio".
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"?
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 Episode of all TV series sorted by rating.
SELECT Episode FROM TV_series ORDER BY rating

What are all of the episodes ordered by ratings?
SELECT Episode FROM TV_series ORDER BY rating

List top 3 highest Rating  TV series. List the TV series's Episode and Rating.
SELECT Episode ,  Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;

What are 3 most highly rated episodes in the TV series table and what were those ratings?
SELECT Episode ,  Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;

What is minimum and maximum share of TV series?
SELECT max(SHARE) , min(SHARE) FROM TV_series;

What is the maximum and minimum share for the TV series?
SELECT max(SHARE) , min(SHARE) FROM TV_series;

What is the air date of TV series with Episode "A Love of a Lifetime"?
SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime";

When did the episode "A Love of a Lifetime" air?
SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime";

What is Weekly Rank of TV series with Episode "A Love of a Lifetime"?
SELECT Weekly_Rank FROM TV_series WHERE Episode = "A Love of a Lifetime";

What is the weekly rank for the episode "A Love of a Lifetime"?
SELECT Weekly_Rank FROM TV_series WHERE Episode = "A Love of a Lifetime";

What is the TV Channel of TV series with Episode "A Love of a Lifetime"? List the TV Channel's series name.
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"?
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";

List the Episode of all  TV series showed on TV Channel with series name "Sky Radio".
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"?
SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio";

Find the number of cartoons directed by each of the listed directors.
SELECT count(*) ,  Directed_by FROM cartoon GROUP BY Directed_by

How many cartoons did each director create?
SELECT count(*) ,  Directed_by FROM cartoon GROUP BY Directed_by

Find the production code and channel of the most recently aired cartoon .
select production_code ,  channel from cartoon order by original_air_date desc limit 1

What is the produdction code and channel of the most recent cartoon ?
select production_code ,  channel from cartoon order by original_air_date desc limit 1

Find the package choice and series name of the TV channel that has high definition TV.
SELECT package_option ,  series_name FROM TV_Channel WHERE hight_definition_TV  =  "yes"

What are the package options and the name of the series for the TV Channel that supports high definition TV?
SELECT package_option ,  series_name FROM TV_Channel WHERE hight_definition_TV  =  "yes"

which countries' tv channels are playing some cartoon written by Todd Casey?
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?
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?
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?
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'

Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?
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?
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 pixel aspect ratio and nation of the tv channels that do not use English.
SELECT Pixel_aspect_ratio_PAR ,  country FROM tv_channel WHERE LANGUAGE != 'English'

What is the pixel aspect ratio and country of origin for all TV channels that do not use English?
SELECT Pixel_aspect_ratio_PAR ,  country FROM tv_channel WHERE LANGUAGE != 'English'

find id of the tv channels that from the countries where have more than two tv channels.
SELECT id FROM tv_channel GROUP BY country HAVING count(*)  >  2

What are the ids of all tv channels that have more than 2 TV channels?
SELECT id FROM tv_channel GROUP BY country HAVING count(*)  >  2

find the id of tv channels that do not play any cartoon directed by Ben Jones.
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?
SELECT id FROM TV_Channel EXCEPT 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.
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?
SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by  =  'Ben Jones')