Database: tvshow

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

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

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

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

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

Question: List the title of all Cartoons showed on TV Channel with series name "Sky Radio".
SQL: SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio";

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

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

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

Question: List the Episode of all TV series showed on TV Channel with series name "Sky Radio".
SQL: SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio";

Question: Find the production code and channel of the most recently aired cartoon.
SQL: SELECT production_code ,  channel FROM cartoon ORDER BY original_air_date LIMIT 1

Question: which countries' tv channels are playing some cartoon written by Todd Casey?
SQL: SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by  =  'Todd Casey'

Question: which countries' tv channels are not playing any cartoon written by Todd Casey?
SQL: 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'

Question: Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?
SQL: 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'