db_id stringclasses 140
values | question stringlengths 16 224 | query stringlengths 18 577 | db_schema stringclasses 140
values | question_toks listlengths 4 44 |
|---|---|---|---|---|
baseball_1 | Count the total number of games the team Boston Red Stockings attended from 1990 to 2000. | SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"Count",
"the",
"total",
"number",
"of",
"games",
"the",
"team",
"Boston",
"Red",
"Stockings",
"attended",
"from",
"1990",
"to",
"2000",
"."
] |
baseball_1 | Which team had the least number of attendances in home games in 1980? | SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"Which",
"team",
"had",
"the",
"least",
"number",
"of",
"attendances",
"in",
"home",
"games",
"in",
"1980",
"?"
] |
baseball_1 | Find the team that attended the least number of home games in 1980. | SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"Find",
"the",
"team",
"that",
"attended",
"the",
"least",
"number",
"of",
"home",
"games",
"in",
"1980",
"."
] |
baseball_1 | List the names of states that have more than 2 parks. | SELECT state FROM park GROUP BY state HAVING count(*) > 2; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"List",
"the",
"names",
"of",
"states",
"that",
"have",
"more",
"than",
"2",
"parks",
"."
] |
baseball_1 | Which states have more than 2 parks? | SELECT state FROM park GROUP BY state HAVING count(*) > 2; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"Which",
"states",
"have",
"more",
"than",
"2",
"parks",
"?"
] |
baseball_1 | How many team franchises are active, with active value 'Y'? | SELECT count(*) FROM team_franchise WHERE active = 'Y'; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"How",
"many",
"team",
"franchises",
"are",
"active",
",",
"with",
"active",
"value",
"'Y",
"'",
"?"
] |
baseball_1 | Find the number of team franchises that are active (have 'Y' as "active" information). | SELECT count(*) FROM team_franchise WHERE active = 'Y'; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"Find",
"the",
"number",
"of",
"team",
"franchises",
"that",
"are",
"active",
"(",
"have",
"'Y",
"'",
"as",
"``",
"active",
"''",
"information",
")",
"."
] |
baseball_1 | Which cities have 2 to 4 parks? | SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"Which",
"cities",
"have",
"2",
"to",
"4",
"parks",
"?"
] |
baseball_1 | Find all the cities that have 2 to 4 parks. | SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"Find",
"all",
"the",
"cities",
"that",
"have",
"2",
"to",
"4",
"parks",
"."
] |
baseball_1 | Which park had most attendances in 2008? | SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"Which",
"park",
"had",
"most",
"attendances",
"in",
"2008",
"?"
] |
baseball_1 | Which park did the most people attend in 2008? | SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1; | all_star: player_id (text), year (number), game_num (number), game_id (text), team_id (text), league_id (text), gp (number), starting_pos (number) | appearances: year (number), team_id (text), league_id (text), player_id (text), g_all (number), gs (number), g_batting (number), g_defense (number), g_p (number), g_c (num... | [
"Which",
"park",
"did",
"the",
"most",
"people",
"attend",
"in",
"2008",
"?"
] |
mountain_photos | How many camera lenses have a focal length longer than 15 mm? | SELECT count(*) FROM camera_lens WHERE focal_length_mm > 15 | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"How",
"many",
"camera",
"lenses",
"have",
"a",
"focal",
"length",
"longer",
"than",
"15",
"mm",
"?"
] |
mountain_photos | Find the brand and name for each camera lens, and sort in descending order of maximum aperture. | SELECT brand , name FROM camera_lens ORDER BY max_aperture DESC | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"Find",
"the",
"brand",
"and",
"name",
"for",
"each",
"camera",
"lens",
",",
"and",
"sort",
"in",
"descending",
"order",
"of",
"maximum",
"aperture",
"."
] |
mountain_photos | List the id, color scheme, and name for all the photos. | SELECT id , color , name FROM photos | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"List",
"the",
"id",
",",
"color",
"scheme",
",",
"and",
"name",
"for",
"all",
"the",
"photos",
"."
] |
mountain_photos | What are the maximum and average height of the mountains? | SELECT max(height) , avg(height) FROM mountain | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"What",
"are",
"the",
"maximum",
"and",
"average",
"height",
"of",
"the",
"mountains",
"?"
] |
mountain_photos | What are the average prominence of the mountains in country 'Morocco'? | SELECT avg(prominence) FROM mountain WHERE country = 'Morocco' | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"What",
"are",
"the",
"average",
"prominence",
"of",
"the",
"mountains",
"in",
"country",
"'Morocco",
"'",
"?"
] |
mountain_photos | What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'? | SELECT name , height , prominence FROM mountain WHERE range != 'Aberdare Range' | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"What",
"are",
"the",
"name",
",",
"height",
"and",
"prominence",
"of",
"mountains",
"which",
"do",
"not",
"belong",
"to",
"the",
"range",
"'Aberdare",
"Range",
"'",
"?"
] |
mountain_photos | What are the id and name of the photos for mountains? | SELECT T1.id , T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000 | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"What",
"are",
"the",
"id",
"and",
"name",
"of",
"the",
"photos",
"for",
"mountains",
"?"
] |
mountain_photos | What are the id and name of the mountains that have at least 2 photos? | SELECT T1.id , T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id HAVING count(*) >= 2 | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"What",
"are",
"the",
"id",
"and",
"name",
"of",
"the",
"mountains",
"that",
"have",
"at",
"least",
"2",
"photos",
"?"
] |
mountain_photos | What are the names of the cameras that have taken picture of the most mountains? | SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1 | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"What",
"are",
"the",
"names",
"of",
"the",
"cameras",
"that",
"have",
"taken",
"picture",
"of",
"the",
"most",
"mountains",
"?"
] |
mountain_photos | What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'? | SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"What",
"are",
"the",
"names",
"of",
"photos",
"taken",
"with",
"the",
"lens",
"brand",
"'Sigma",
"'",
"or",
"'Olympus",
"'",
"?"
] |
mountain_photos | How many different kinds of lens brands are there? | SELECT count(DISTINCT brand) FROM camera_lens | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"How",
"many",
"different",
"kinds",
"of",
"lens",
"brands",
"are",
"there",
"?"
] |
mountain_photos | How many camera lenses are not used in taking any photos? | SELECT count(*) FROM camera_lens WHERE id NOT IN ( SELECT camera_lens_id FROM photos ) | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"How",
"many",
"camera",
"lenses",
"are",
"not",
"used",
"in",
"taking",
"any",
"photos",
"?"
] |
mountain_photos | How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'? | SELECT count(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia' | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"How",
"many",
"distinct",
"kinds",
"of",
"camera",
"lenses",
"are",
"used",
"to",
"take",
"photos",
"of",
"mountains",
"in",
"the",
"country",
"'Ethiopia",
"'",
"?"
] |
mountain_photos | List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif' | SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHE... | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"List",
"the",
"brands",
"of",
"lenses",
"that",
"took",
"both",
"a",
"picture",
"of",
"mountains",
"with",
"range",
"'Toubkal",
"Atlas",
"'",
"and",
"a",
"picture",
"of",
"mountains",
"with",
"range",
"'Lasta",
"Massif",
"'"
] |
mountain_photos | Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'. | SELECT name , prominence FROM mountain EXCEPT SELECT T1.name , T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma' | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"Show",
"the",
"name",
"and",
"prominence",
"of",
"the",
"mountains",
"whose",
"picture",
"is",
"not",
"taken",
"by",
"a",
"lens",
"of",
"brand",
"'Sigma",
"'",
"."
] |
mountain_photos | List the camera lens names containing substring "Digital". | SELECT name FROM camera_lens WHERE name LIKE "%Digital%" | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"List",
"the",
"camera",
"lens",
"names",
"containing",
"substring",
"``",
"Digital",
"''",
"."
] |
mountain_photos | What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos. | SELECT T1.name , count(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY count(*) | mountain: id (number), name (text), Height (number), Prominence (number), Range (text), Country (text) | camera_lens: id (number), brand (text), name (text), focal_length_mm (number), max_aperture (number) | photos: id (number), camera_lens_id (number), mountain_id (number), color (text), name (text) | [
"What",
"is",
"the",
"name",
"of",
"each",
"camera",
"lens",
"and",
"the",
"number",
"of",
"photos",
"taken",
"by",
"it",
"?",
"Order",
"the",
"result",
"by",
"the",
"count",
"of",
"photos",
"."
] |
program_share | Find the names of channels that are not owned by CCTV. | SELECT name FROM channel WHERE OWNER != 'CCTV' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Find",
"the",
"names",
"of",
"channels",
"that",
"are",
"not",
"owned",
"by",
"CCTV",
"."
] |
program_share | Which channels are not owned by CCTV? Give me the channel names. | SELECT name FROM channel WHERE OWNER != 'CCTV' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Which",
"channels",
"are",
"not",
"owned",
"by",
"CCTV",
"?",
"Give",
"me",
"the",
"channel",
"names",
"."
] |
program_share | List all channel names ordered by their rating in percent from big to small. | SELECT name FROM channel ORDER BY rating_in_percent DESC | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"List",
"all",
"channel",
"names",
"ordered",
"by",
"their",
"rating",
"in",
"percent",
"from",
"big",
"to",
"small",
"."
] |
program_share | Give me a list of all the channel names sorted by the channel rating in descending order. | SELECT name FROM channel ORDER BY rating_in_percent DESC | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Give",
"me",
"a",
"list",
"of",
"all",
"the",
"channel",
"names",
"sorted",
"by",
"the",
"channel",
"rating",
"in",
"descending",
"order",
"."
] |
program_share | What is the owner of the channel that has the highest rating ratio? | SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1 | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"What",
"is",
"the",
"owner",
"of",
"the",
"channel",
"that",
"has",
"the",
"highest",
"rating",
"ratio",
"?"
] |
program_share | Show me the owner of the channel with the highest rating. | SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1 | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Show",
"me",
"the",
"owner",
"of",
"the",
"channel",
"with",
"the",
"highest",
"rating",
"."
] |
program_share | how many programs are there? | SELECT count(*) FROM program | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"how",
"many",
"programs",
"are",
"there",
"?"
] |
program_share | Count the number of programs. | SELECT count(*) FROM program | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Count",
"the",
"number",
"of",
"programs",
"."
] |
program_share | list all the names of programs, ordering by launch time. | SELECT name FROM program ORDER BY launch | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"list",
"all",
"the",
"names",
"of",
"programs",
",",
"ordering",
"by",
"launch",
"time",
"."
] |
program_share | What is the list of program names, sorted by the order of launch date? | SELECT name FROM program ORDER BY launch | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"What",
"is",
"the",
"list",
"of",
"program",
"names",
",",
"sorted",
"by",
"the",
"order",
"of",
"launch",
"date",
"?"
] |
program_share | List the name, origin and owner of each program. | SELECT name , origin , OWNER FROM program | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"List",
"the",
"name",
",",
"origin",
"and",
"owner",
"of",
"each",
"program",
"."
] |
program_share | What are the name, origin and owner of each program? | SELECT name , origin , OWNER FROM program | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"What",
"are",
"the",
"name",
",",
"origin",
"and",
"owner",
"of",
"each",
"program",
"?"
] |
program_share | find the name of the program that was launched most recently. | SELECT name FROM program ORDER BY launch DESC LIMIT 1 | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"find",
"the",
"name",
"of",
"the",
"program",
"that",
"was",
"launched",
"most",
"recently",
"."
] |
program_share | Which program was launched most recently? Return the program name. | SELECT name FROM program ORDER BY launch DESC LIMIT 1 | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Which",
"program",
"was",
"launched",
"most",
"recently",
"?",
"Return",
"the",
"program",
"name",
"."
] |
program_share | find the total percentage share of all channels owned by CCTV. | SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"find",
"the",
"total",
"percentage",
"share",
"of",
"all",
"channels",
"owned",
"by",
"CCTV",
"."
] |
program_share | What is the total share (in percent) of all the channels owned by CCTV? | SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"What",
"is",
"the",
"total",
"share",
"(",
"in",
"percent",
")",
"of",
"all",
"the",
"channels",
"owned",
"by",
"CCTV",
"?"
] |
program_share | Find the names of the channels that are broadcast in the morning. | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Find",
"the",
"names",
"of",
"the",
"channels",
"that",
"are",
"broadcast",
"in",
"the",
"morning",
"."
] |
program_share | Which channels are broadcast in the morning? Give me the channel names. | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Which",
"channels",
"are",
"broadcast",
"in",
"the",
"morning",
"?",
"Give",
"me",
"the",
"channel",
"names",
"."
] |
program_share | what are the names of the channels that broadcast in both morning and night? | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"what",
"are",
"the",
"names",
"of",
"the",
"channels",
"that",
"broadcast",
"in",
"both",
"morning",
"and",
"night",
"?"
] |
program_share | Which channels broadcast both in the morning and at night? Give me the channel names. | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Which",
"channels",
"broadcast",
"both",
"in",
"the",
"morning",
"and",
"at",
"night",
"?",
"Give",
"me",
"the",
"channel",
"names",
"."
] |
program_share | how many programs are broadcast in each time section of the day? | SELECT count(*) , time_of_day FROM broadcast GROUP BY time_of_day | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"how",
"many",
"programs",
"are",
"broadcast",
"in",
"each",
"time",
"section",
"of",
"the",
"day",
"?"
] |
program_share | Count the number of programs broadcast for each time section of a day. | SELECT count(*) , time_of_day FROM broadcast GROUP BY time_of_day | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Count",
"the",
"number",
"of",
"programs",
"broadcast",
"for",
"each",
"time",
"section",
"of",
"a",
"day",
"."
] |
program_share | find the number of different programs that are broadcast during night time. | SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"find",
"the",
"number",
"of",
"different",
"programs",
"that",
"are",
"broadcast",
"during",
"night",
"time",
"."
] |
program_share | How many distinct programs are broadcast at "Night" time? | SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"How",
"many",
"distinct",
"programs",
"are",
"broadcast",
"at",
"``",
"Night",
"''",
"time",
"?"
] |
program_share | Find the names of programs that are never broadcasted in the morning. | SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Morning" | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Find",
"the",
"names",
"of",
"programs",
"that",
"are",
"never",
"broadcasted",
"in",
"the",
"morning",
"."
] |
program_share | Which programs are never broadcasted in the morning? Give me the names of the programs. | SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Morning" | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Which",
"programs",
"are",
"never",
"broadcasted",
"in",
"the",
"morning",
"?",
"Give",
"me",
"the",
"names",
"of",
"the",
"programs",
"."
] |
program_share | find the program owners that have some programs in both morning and night time. | SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Morning" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Night" | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"find",
"the",
"program",
"owners",
"that",
"have",
"some",
"programs",
"in",
"both",
"morning",
"and",
"night",
"time",
"."
] |
program_share | Who are the owners of the programs that broadcast both in the morning and at night? | SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Morning" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Night" | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Who",
"are",
"the",
"owners",
"of",
"the",
"programs",
"that",
"broadcast",
"both",
"in",
"the",
"morning",
"and",
"at",
"night",
"?"
] |
program_share | List all program origins in the alphabetical order. | SELECT origin FROM program ORDER BY origin | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"List",
"all",
"program",
"origins",
"in",
"the",
"alphabetical",
"order",
"."
] |
program_share | What is the list of program origins ordered alphabetically? | SELECT origin FROM program ORDER BY origin | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"What",
"is",
"the",
"list",
"of",
"program",
"origins",
"ordered",
"alphabetically",
"?"
] |
program_share | what is the number of different channel owners? | SELECT count(DISTINCT OWNER) FROM channel | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"what",
"is",
"the",
"number",
"of",
"different",
"channel",
"owners",
"?"
] |
program_share | Count the number of distinct channel owners. | SELECT count(DISTINCT OWNER) FROM channel | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Count",
"the",
"number",
"of",
"distinct",
"channel",
"owners",
"."
] |
program_share | find the names of programs whose origin is not in Beijing. | SELECT name FROM program WHERE origin != 'Beijing' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"find",
"the",
"names",
"of",
"programs",
"whose",
"origin",
"is",
"not",
"in",
"Beijing",
"."
] |
program_share | Which programs' origins are not "Beijing"? Give me the program names. | SELECT name FROM program WHERE origin != 'Beijing' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Which",
"programs",
"'",
"origins",
"are",
"not",
"``",
"Beijing",
"''",
"?",
"Give",
"me",
"the",
"program",
"names",
"."
] |
program_share | What are the names of the channels owned by CCTV or HBS? | SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"What",
"are",
"the",
"names",
"of",
"the",
"channels",
"owned",
"by",
"CCTV",
"or",
"HBS",
"?"
] |
program_share | List the names of all the channels owned by either CCTV or HBS | SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS' | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"List",
"the",
"names",
"of",
"all",
"the",
"channels",
"owned",
"by",
"either",
"CCTV",
"or",
"HBS"
] |
program_share | Find the total rating ratio for each channel owner. | SELECT sum(Rating_in_percent) , OWNER FROM channel GROUP BY OWNER | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Find",
"the",
"total",
"rating",
"ratio",
"for",
"each",
"channel",
"owner",
"."
] |
program_share | What is the total rating of channel for each channel owner? | SELECT sum(Rating_in_percent) , OWNER FROM channel GROUP BY OWNER | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"What",
"is",
"the",
"total",
"rating",
"of",
"channel",
"for",
"each",
"channel",
"owner",
"?"
] |
program_share | Find the name of the program that is broadcast most frequently. | SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY count(*) DESC LIMIT 1 | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Find",
"the",
"name",
"of",
"the",
"program",
"that",
"is",
"broadcast",
"most",
"frequently",
"."
] |
program_share | Which program is broadcast most frequently? Give me the program name. | SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY count(*) DESC LIMIT 1 | program: Program_ID (number), Name (text), Origin (text), Launch (number), Owner (text) | channel: Channel_ID (number), Name (text), Owner (text), Share_in_percent (number), Rating_in_percent (number) | broadcast: Channel_ID (number), Program_ID (number), Time_of_day (text) | broadcast_share: Channel_ID (number), Progr... | [
"Which",
"program",
"is",
"broadcast",
"most",
"frequently",
"?",
"Give",
"me",
"the",
"program",
"name",
"."
] |
e_learning | How many courses are there in total? | SELECT count(*) FROM COURSES | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"How",
"many",
"courses",
"are",
"there",
"in",
"total",
"?"
] |
e_learning | Find the total number of courses offered. | SELECT count(*) FROM COURSES | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Find",
"the",
"total",
"number",
"of",
"courses",
"offered",
"."
] |
e_learning | What are the descriptions of the courses with name "database"? | SELECT course_description FROM COURSES WHERE course_name = "database" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"What",
"are",
"the",
"descriptions",
"of",
"the",
"courses",
"with",
"name",
"``",
"database",
"''",
"?"
] |
e_learning | Return the description for the courses named "database". | SELECT course_description FROM COURSES WHERE course_name = "database" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Return",
"the",
"description",
"for",
"the",
"courses",
"named",
"``",
"database",
"''",
"."
] |
e_learning | What are the addresses of the course authors or tutors with personal name "Cathrine" | SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = "Cathrine" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"What",
"are",
"the",
"addresses",
"of",
"the",
"course",
"authors",
"or",
"tutors",
"with",
"personal",
"name",
"``",
"Cathrine",
"''"
] |
e_learning | Return the addresses of the course authors or tutors whose personal name is "Cathrine". | SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = "Cathrine" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Return",
"the",
"addresses",
"of",
"the",
"course",
"authors",
"or",
"tutors",
"whose",
"personal",
"name",
"is",
"``",
"Cathrine",
"''",
"."
] |
e_learning | List the addresses of all the course authors or tutors. | SELECT address_line_1 FROM Course_Authors_and_Tutors | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"List",
"the",
"addresses",
"of",
"all",
"the",
"course",
"authors",
"or",
"tutors",
"."
] |
e_learning | What is the address of each course author or tutor? | SELECT address_line_1 FROM Course_Authors_and_Tutors | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"What",
"is",
"the",
"address",
"of",
"each",
"course",
"author",
"or",
"tutor",
"?"
] |
e_learning | List all the login names and family names of course author and tutors. | SELECT login_name , family_name FROM Course_Authors_and_Tutors | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"List",
"all",
"the",
"login",
"names",
"and",
"family",
"names",
"of",
"course",
"author",
"and",
"tutors",
"."
] |
e_learning | What are the login names and family names of course author and tutors? | SELECT login_name , family_name FROM Course_Authors_and_Tutors | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"What",
"are",
"the",
"login",
"names",
"and",
"family",
"names",
"of",
"course",
"author",
"and",
"tutors",
"?"
] |
e_learning | List all the dates of enrollment and completion of students. | SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"List",
"all",
"the",
"dates",
"of",
"enrollment",
"and",
"completion",
"of",
"students",
"."
] |
e_learning | What are all the dates of enrollment and completion in record? | SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"What",
"are",
"all",
"the",
"dates",
"of",
"enrollment",
"and",
"completion",
"in",
"record",
"?"
] |
e_learning | How many distinct students are enrolled in courses? | SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"How",
"many",
"distinct",
"students",
"are",
"enrolled",
"in",
"courses",
"?"
] |
e_learning | Find the number of distinct students enrolled in courses. | SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Find",
"the",
"number",
"of",
"distinct",
"students",
"enrolled",
"in",
"courses",
"."
] |
e_learning | How many distinct courses are enrolled in by students? | SELECT count(course_id) FROM Student_Course_Enrolment | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"How",
"many",
"distinct",
"courses",
"are",
"enrolled",
"in",
"by",
"students",
"?"
] |
e_learning | Find the number of distinct courses that have enrolled students. | SELECT count(course_id) FROM Student_Course_Enrolment | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Find",
"the",
"number",
"of",
"distinct",
"courses",
"that",
"have",
"enrolled",
"students",
"."
] |
e_learning | Find the dates of the tests taken with result "Pass". | SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = "Pass" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Find",
"the",
"dates",
"of",
"the",
"tests",
"taken",
"with",
"result",
"``",
"Pass",
"''",
"."
] |
e_learning | Which tests have "Pass" results? Return the dates when the tests were taken. | SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = "Pass" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Which",
"tests",
"have",
"``",
"Pass",
"''",
"results",
"?",
"Return",
"the",
"dates",
"when",
"the",
"tests",
"were",
"taken",
"."
] |
e_learning | How many tests have result "Fail"? | SELECT count(*) FROM Student_Tests_Taken WHERE test_result = "Fail" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"How",
"many",
"tests",
"have",
"result",
"``",
"Fail",
"''",
"?"
] |
e_learning | Count the number of tests with "Fail" result. | SELECT count(*) FROM Student_Tests_Taken WHERE test_result = "Fail" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Count",
"the",
"number",
"of",
"tests",
"with",
"``",
"Fail",
"''",
"result",
"."
] |
e_learning | What are the login names of the students with family name "Ward"? | SELECT login_name FROM Students WHERE family_name = "Ward" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"What",
"are",
"the",
"login",
"names",
"of",
"the",
"students",
"with",
"family",
"name",
"``",
"Ward",
"''",
"?"
] |
e_learning | Return the login names of the students whose family name is "Ward". | SELECT login_name FROM Students WHERE family_name = "Ward" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Return",
"the",
"login",
"names",
"of",
"the",
"students",
"whose",
"family",
"name",
"is",
"``",
"Ward",
"''",
"."
] |
e_learning | What are the dates of the latest logon of the students with family name "Jaskolski" or "Langosh"? | SELECT date_of_latest_logon FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"What",
"are",
"the",
"dates",
"of",
"the",
"latest",
"logon",
"of",
"the",
"students",
"with",
"family",
"name",
"``",
"Jaskolski",
"''",
"or",
"``",
"Langosh",
"''",
"?"
] |
e_learning | Find the latest logon date of the students whose family name is "Jaskolski" or "Langosh". | SELECT date_of_latest_logon FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Find",
"the",
"latest",
"logon",
"date",
"of",
"the",
"students",
"whose",
"family",
"name",
"is",
"``",
"Jaskolski",
"''",
"or",
"``",
"Langosh",
"''",
"."
] |
e_learning | How many students have personal names that contain the word "son"? | SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"How",
"many",
"students",
"have",
"personal",
"names",
"that",
"contain",
"the",
"word",
"``",
"son",
"''",
"?"
] |
e_learning | Find the number of students who have the word "son" in their personal names. | SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%" | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Find",
"the",
"number",
"of",
"students",
"who",
"have",
"the",
"word",
"``",
"son",
"''",
"in",
"their",
"personal",
"names",
"."
] |
e_learning | List all the subject names. | SELECT subject_name FROM SUBJECTS | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"List",
"all",
"the",
"subject",
"names",
"."
] |
e_learning | What are the names of all the subjects. | SELECT subject_name FROM SUBJECTS | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"What",
"are",
"the",
"names",
"of",
"all",
"the",
"subjects",
"."
] |
e_learning | List all the information about course authors and tutors in alphabetical order of the personal name. | SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"List",
"all",
"the",
"information",
"about",
"course",
"authors",
"and",
"tutors",
"in",
"alphabetical",
"order",
"of",
"the",
"personal",
"name",
"."
] |
e_learning | Sort the information about course authors and tutors in alphabetical order of the personal name. | SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"Sort",
"the",
"information",
"about",
"course",
"authors",
"and",
"tutors",
"in",
"alphabetical",
"order",
"of",
"the",
"personal",
"name",
"."
] |
e_learning | List the personal names and family names of all the students in alphabetical order of family name. | SELECT personal_name , family_name FROM Students ORDER BY family_name | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"List",
"the",
"personal",
"names",
"and",
"family",
"names",
"of",
"all",
"the",
"students",
"in",
"alphabetical",
"order",
"of",
"family",
"name",
"."
] |
e_learning | What are the personal names and family names of the students? Sort the result in alphabetical order of the family name. | SELECT personal_name , family_name FROM Students ORDER BY family_name | Course_Authors_and_Tutors: author_id (number), author_tutor_ATB (text), login_name (text), password (text), personal_name (text), middle_name (text), family_name (text), gender_mf (text), address_line_1 (text) | Students: student_id (number), date_of_registration (time), date_of_latest_logon (time), login_name (text), ... | [
"What",
"are",
"the",
"personal",
"names",
"and",
"family",
"names",
"of",
"the",
"students",
"?",
"Sort",
"the",
"result",
"in",
"alphabetical",
"order",
"of",
"the",
"family",
"name",
"."
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.