input stringlengths 667 7.62k | output stringlengths 41 600 | db_id stringlengths 3 31 | query stringlengths 18 577 | question stringlengths 3 224 | schema stringlengths 177 6.14k | primary_keys stringlengths 16 545 | foreign_keys stringlengths 16 1.48k |
|---|---|---|---|---|---|---|---|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>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;</SQL_QUERY> | baseball_1 | 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; | Count the total number of games the team Boston Red Stockings attended from 1990 to 2000. | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>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;</SQL_QUERY> | baseball_1 | 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; | Which team had the least number of attendances in home games in 1980? | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>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;</SQL_QUERY> | baseball_1 | 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; | Find the team that attended the least number of home games in 1980. | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>SELECT state FROM park GROUP BY state HAVING count(*) > 2;</SQL_QUERY> | baseball_1 | SELECT state FROM park GROUP BY state HAVING count(*) > 2; | List the names of states that have more than 2 parks. | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>SELECT state FROM park GROUP BY state HAVING count(*) > 2;</SQL_QUERY> | baseball_1 | SELECT state FROM park GROUP BY state HAVING count(*) > 2; | Which states have more than 2 parks? | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>SELECT count(*) FROM team_franchise WHERE active = 'Y';</SQL_QUERY> | baseball_1 | SELECT count(*) FROM team_franchise WHERE active = 'Y'; | How many team franchises are active, with active value 'Y'? | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>SELECT count(*) FROM team_franchise WHERE active = 'Y';</SQL_QUERY> | baseball_1 | SELECT count(*) FROM team_franchise WHERE active = 'Y'; | Find the number of team franchises that are active (have 'Y' as "active" information). | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4;</SQL_QUERY> | baseball_1 | SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4; | Which cities have 2 to 4 parks? | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4;</SQL_QUERY> | baseball_1 | SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4; | Find all the cities that have 2 to 4 parks. | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>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;</SQL_QUERY> | baseball_1 | 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; | Which park had most attendances in 2008? | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , ga... | <SQL_QUERY>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;</SQL_QUERY> | baseball_1 | 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; | Which park did the most people attend in 2008? | [Schema (values) (types)]: | baseball_1 | all_star : player_id (text) , year (text) , game_num (number) , game_id (number) , team_id (text) , league_id (text) , gp (text) , starting_pos (number) | appearances : year (text) , team_id (text) , league_id (number) , player_id (number) , g_all (text) , gs (text) , g_battin... | [Primary Keys]: | [Foreign Keys]: all_star : player_id = player : player_id | appearances : player_id = player : player_id | appearances : team_id = team : team_id | manager_award : player_id = player : player_id | player_award : player_id = player : player_id | player_award_vote : player_id = player : player_id | batting : player_id = ... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>SELECT count(*) FROM camera_lens WHERE focal_length_mm > 15</SQL_QUERY> | mountain_photos | SELECT count(*) FROM camera_lens WHERE focal_length_mm > 15 | How many camera lenses have a focal length longer than 15 mm? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>SELECT brand , name FROM camera_lens ORDER BY max_aperture DESC</SQL_QUERY> | mountain_photos | SELECT brand , name FROM camera_lens ORDER BY max_aperture DESC | Find the brand and name for each camera lens, and sort in descending order of maximum aperture. | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>SELECT id , color , name FROM photos</SQL_QUERY> | mountain_photos | SELECT id , color , name FROM photos | List the id, color scheme, and name for all the photos. | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>SELECT max(height) , avg(height) FROM mountain</SQL_QUERY> | mountain_photos | SELECT max(height) , avg(height) FROM mountain | What are the maximum and average height of the mountains? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>SELECT avg(prominence) FROM mountain WHERE country = 'Morocco'</SQL_QUERY> | mountain_photos | SELECT avg(prominence) FROM mountain WHERE country = 'Morocco' | What are the average prominence of the mountains in country 'Morocco'? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>SELECT name , height , prominence FROM mountain WHERE range != 'Aberdare Range'</SQL_QUERY> | mountain_photos | SELECT name , height , prominence FROM mountain WHERE range != 'Aberdare Range' | What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>SELECT T1.id , T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000</SQL_QUERY> | mountain_photos | SELECT T1.id , T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000 | What are the id and name of the photos for mountains? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>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</SQL_QUERY> | mountain_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 | What are the id and name of the mountains that have at least 2 photos? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>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</SQL_QUERY> | mountain_photos | 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 | What are the names of the cameras that have taken picture of the most mountains? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>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'</SQL_QUERY> | mountain_photos | 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' | What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>SELECT count(DISTINCT brand) FROM camera_lens</SQL_QUERY> | mountain_photos | SELECT count(DISTINCT brand) FROM camera_lens | How many different kinds of lens brands are there? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>SELECT count(*) FROM camera_lens WHERE id NOT IN ( SELECT camera_lens_id FROM photos )</SQL_QUERY> | mountain_photos | SELECT count(*) FROM camera_lens WHERE id NOT IN ( SELECT camera_lens_id FROM photos ) | How many camera lenses are not used in taking any photos? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>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'</SQL_QUERY> | mountain_photos | 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' | How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'? | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>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 =... | mountain_photos | 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... | 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' | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>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'</SQL_QUERY> | mountain_photos | 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' | Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'. | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>SELECT name FROM camera_lens WHERE name LIKE "%Digital%"</SQL_QUERY> | mountain_photos | SELECT name FROM camera_lens WHERE name LIKE "%Digital%" | List the camera lens names containing substring "Digital". | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , he... | <SQL_QUERY>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(*)</SQL_QUERY> | mountain_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(*) | What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos. | [Schema (values) (types)]: | mountain_photos | mountain : id (text) , name (number) , height (text) , prominence (number) , range (number) , country (text) | camera_lens : id (text) , brand (number) , name (text) , focal_length_mm (number) , max_aperture (number) | photos : id (text) , camera_lens_id (number) , mounta... | [Primary Keys]: mountain : id, camera_lens : id, photos : id | [Foreign Keys]: photos : mountain_id = mountain : id | photos : camera_lens_id = camera_lens : id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM channel WHERE OWNER != 'CCTV'</SQL_QUERY> | program_share | SELECT name FROM channel WHERE OWNER != 'CCTV' | Find the names of channels that are not owned by CCTV. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM channel WHERE OWNER != 'CCTV'</SQL_QUERY> | program_share | SELECT name FROM channel WHERE OWNER != 'CCTV' | Which channels are not owned by CCTV? Give me the channel names. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM channel ORDER BY rating_in_percent DESC</SQL_QUERY> | program_share | SELECT name FROM channel ORDER BY rating_in_percent DESC | List all channel names ordered by their rating in percent from big to small. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM channel ORDER BY rating_in_percent DESC</SQL_QUERY> | program_share | SELECT name FROM channel ORDER BY rating_in_percent DESC | Give me a list of all the channel names sorted by the channel rating in descending order. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1</SQL_QUERY> | program_share | SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1 | What is the owner of the channel that has the highest rating ratio? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1</SQL_QUERY> | program_share | SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1 | Show me the owner of the channel with the highest rating. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT count(*) FROM program</SQL_QUERY> | program_share | SELECT count(*) FROM program | how many programs are there? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT count(*) FROM program</SQL_QUERY> | program_share | SELECT count(*) FROM program | Count the number of programs. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM program ORDER BY launch</SQL_QUERY> | program_share | SELECT name FROM program ORDER BY launch | list all the names of programs, ordering by launch time. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM program ORDER BY launch</SQL_QUERY> | program_share | SELECT name FROM program ORDER BY launch | What is the list of program names, sorted by the order of launch date? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name , origin , OWNER FROM program</SQL_QUERY> | program_share | SELECT name , origin , OWNER FROM program | List the name, origin and owner of each program. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name , origin , OWNER FROM program</SQL_QUERY> | program_share | SELECT name , origin , OWNER FROM program | What are the name, origin and owner of each program? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM program ORDER BY launch DESC LIMIT 1</SQL_QUERY> | program_share | SELECT name FROM program ORDER BY launch DESC LIMIT 1 | find the name of the program that was launched most recently. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM program ORDER BY launch DESC LIMIT 1</SQL_QUERY> | program_share | SELECT name FROM program ORDER BY launch DESC LIMIT 1 | Which program was launched most recently? Return the program name. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'</SQL_QUERY> | program_share | SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV' | find the total percentage share of all channels owned by CCTV. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'</SQL_QUERY> | program_share | SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV' | What is the total share (in percent) of all the channels owned by CCTV? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'</SQL_QUERY> | program_share | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' | Find the names of the channels that are broadcast in the morning. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'</SQL_QUERY> | program_share | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' | Which channels are broadcast in the morning? Give me the channel names. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>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'</SQL_QUERY> | program_share | 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' | what are the names of the channels that broadcast in both morning and night? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>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'</SQL_QUERY> | program_share | 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' | Which channels broadcast both in the morning and at night? Give me the channel names. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT count(*) , time_of_day FROM broadcast GROUP BY time_of_day</SQL_QUERY> | program_share | SELECT count(*) , time_of_day FROM broadcast GROUP BY time_of_day | how many programs are broadcast in each time section of the day? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT count(*) , time_of_day FROM broadcast GROUP BY time_of_day</SQL_QUERY> | program_share | SELECT count(*) , time_of_day FROM broadcast GROUP BY time_of_day | Count the number of programs broadcast for each time section of a day. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'</SQL_QUERY> | program_share | SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night' | find the number of different programs that are broadcast during night time. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'</SQL_QUERY> | program_share | SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night' | How many distinct programs are broadcast at "Night" time? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>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"</SQL_QUERY> | program_share | 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" | Find the names of programs that are never broadcasted in the morning. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>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"</SQL_QUERY> | program_share | 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" | Which programs are never broadcasted in the morning? Give me the names of the programs. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>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"</SQL_QUERY> | program_share | 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" | find the program owners that have some programs in both morning and night time. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>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"</SQL_QUERY> | program_share | 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" | Who are the owners of the programs that broadcast both in the morning and at night? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT origin FROM program ORDER BY origin</SQL_QUERY> | program_share | SELECT origin FROM program ORDER BY origin | List all program origins in the alphabetical order. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT origin FROM program ORDER BY origin</SQL_QUERY> | program_share | SELECT origin FROM program ORDER BY origin | What is the list of program origins ordered alphabetically? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT count(DISTINCT OWNER) FROM channel</SQL_QUERY> | program_share | SELECT count(DISTINCT OWNER) FROM channel | what is the number of different channel owners? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT count(DISTINCT OWNER) FROM channel</SQL_QUERY> | program_share | SELECT count(DISTINCT OWNER) FROM channel | Count the number of distinct channel owners. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM program WHERE origin != 'Beijing'</SQL_QUERY> | program_share | SELECT name FROM program WHERE origin != 'Beijing' | find the names of programs whose origin is not in Beijing. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM program WHERE origin != 'Beijing'</SQL_QUERY> | program_share | SELECT name FROM program WHERE origin != 'Beijing' | Which programs' origins are not "Beijing"? Give me the program names. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'</SQL_QUERY> | program_share | SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS' | What are the names of the channels owned by CCTV or HBS? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'</SQL_QUERY> | program_share | SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS' | List the names of all the channels owned by either CCTV or HBS | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT sum(Rating_in_percent) , OWNER FROM channel GROUP BY OWNER</SQL_QUERY> | program_share | SELECT sum(Rating_in_percent) , OWNER FROM channel GROUP BY OWNER | Find the total rating ratio for each channel owner. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>SELECT sum(Rating_in_percent) , OWNER FROM channel GROUP BY OWNER</SQL_QUERY> | program_share | SELECT sum(Rating_in_percent) , OWNER FROM channel GROUP BY OWNER | What is the total rating of channel for each channel owner? | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>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</SQL_QUERY> | program_share | 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 | Find the name of the program that is broadcast most frequently. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | program_share | program : program_id (text) , name (number)... | <SQL_QUERY>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</SQL_QUERY> | program_share | 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 | Which program is broadcast most frequently? Give me the program name. | [Schema (values) (types)]: | program_share | program : program_id (text) , name (number) , origin (text) , launch (text) , owner (number) | channel : channel_id (text) , name (number) , owner (text) , share_in_percent (text) , rating_in_percent (number) | broadcast : channel_id (text) , program_id (number) , time_of_d... | [Primary Keys]: program : program_id, channel : channel_id, broadcast : channel_id, broadcast_share : channel_id | [Foreign Keys]: broadcast : program_id = program : program_id | broadcast : channel_id = channel : channel_id | broadcast_share : program_id = program : program_id | broadcast_share : channel_id = channel : channel_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT count(*) FROM COURSES</SQL_QUERY> | e_learning | SELECT count(*) FROM COURSES | How many courses are there in total? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT count(*) FROM COURSES</SQL_QUERY> | e_learning | SELECT count(*) FROM COURSES | Find the total number of courses offered. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT course_description FROM COURSES WHERE course_name = "database"</SQL_QUERY> | e_learning | SELECT course_description FROM COURSES WHERE course_name = "database" | What are the descriptions of the courses with name "database"? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT course_description FROM COURSES WHERE course_name = "database"</SQL_QUERY> | e_learning | SELECT course_description FROM COURSES WHERE course_name = "database" | Return the description for the courses named "database". | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = "Cathrine"</SQL_QUERY> | e_learning | SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = "Cathrine" | What are the addresses of the course authors or tutors with personal name "Cathrine" | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = "Cathrine"</SQL_QUERY> | e_learning | SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = "Cathrine" | Return the addresses of the course authors or tutors whose personal name is "Cathrine". | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT address_line_1 FROM Course_Authors_and_Tutors</SQL_QUERY> | e_learning | SELECT address_line_1 FROM Course_Authors_and_Tutors | List the addresses of all the course authors or tutors. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT address_line_1 FROM Course_Authors_and_Tutors</SQL_QUERY> | e_learning | SELECT address_line_1 FROM Course_Authors_and_Tutors | What is the address of each course author or tutor? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT login_name , family_name FROM Course_Authors_and_Tutors</SQL_QUERY> | e_learning | SELECT login_name , family_name FROM Course_Authors_and_Tutors | List all the login names and family names of course author and tutors. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT login_name , family_name FROM Course_Authors_and_Tutors</SQL_QUERY> | e_learning | SELECT login_name , family_name FROM Course_Authors_and_Tutors | What are the login names and family names of course author and tutors? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment</SQL_QUERY> | e_learning | SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment | List all the dates of enrollment and completion of students. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment</SQL_QUERY> | e_learning | SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment | What are all the dates of enrollment and completion in record? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment</SQL_QUERY> | e_learning | SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment | How many distinct students are enrolled in courses? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment</SQL_QUERY> | e_learning | SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment | Find the number of distinct students enrolled in courses. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT count(course_id) FROM Student_Course_Enrolment</SQL_QUERY> | e_learning | SELECT count(course_id) FROM Student_Course_Enrolment | How many distinct courses are enrolled in by students? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT count(course_id) FROM Student_Course_Enrolment</SQL_QUERY> | e_learning | SELECT count(course_id) FROM Student_Course_Enrolment | Find the number of distinct courses that have enrolled students. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = "Pass"</SQL_QUERY> | e_learning | SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = "Pass" | Find the dates of the tests taken with result "Pass". | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = "Pass"</SQL_QUERY> | e_learning | SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = "Pass" | Which tests have "Pass" results? Return the dates when the tests were taken. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT count(*) FROM Student_Tests_Taken WHERE test_result = "Fail"</SQL_QUERY> | e_learning | SELECT count(*) FROM Student_Tests_Taken WHERE test_result = "Fail" | How many tests have result "Fail"? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT count(*) FROM Student_Tests_Taken WHERE test_result = "Fail"</SQL_QUERY> | e_learning | SELECT count(*) FROM Student_Tests_Taken WHERE test_result = "Fail" | Count the number of tests with "Fail" result. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT login_name FROM Students WHERE family_name = "Ward"</SQL_QUERY> | e_learning | SELECT login_name FROM Students WHERE family_name = "Ward" | What are the login names of the students with family name "Ward"? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT login_name FROM Students WHERE family_name = "Ward"</SQL_QUERY> | e_learning | SELECT login_name FROM Students WHERE family_name = "Ward" | Return the login names of the students whose family name is "Ward". | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT date_of_latest_logon FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh"</SQL_QUERY> | e_learning | SELECT date_of_latest_logon FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" | What are the dates of the latest logon of the students with family name "Jaskolski" or "Langosh"? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT date_of_latest_logon FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh"</SQL_QUERY> | e_learning | SELECT date_of_latest_logon FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" | Find the latest logon date of the students whose family name is "Jaskolski" or "Langosh". | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%"</SQL_QUERY> | e_learning | SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%" | How many students have personal names that contain the word "son"? | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%"</SQL_QUERY> | e_learning | SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%" | Find the number of students who have the word "son" in their personal names. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT subject_name FROM SUBJECTS</SQL_QUERY> | e_learning | SELECT subject_name FROM SUBJECTS | List all the subject names. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT subject_name FROM SUBJECTS</SQL_QUERY> | e_learning | SELECT subject_name FROM SUBJECTS | What are the names of all the subjects. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name</SQL_QUERY> | e_learning | SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name | List all the information about course authors and tutors in alphabetical order of the personal name. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name</SQL_QUERY> | e_learning | SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name | Sort the information about course authors and tutors in alphabetical order of the personal name. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT personal_name , family_name FROM Students ORDER BY family_name</SQL_QUERY> | e_learning | SELECT personal_name , family_name FROM Students ORDER BY family_name | List the personal names and family names of all the students in alphabetical order of family name. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) ,... | <SQL_QUERY>SELECT personal_name , family_name FROM Students ORDER BY family_name</SQL_QUERY> | e_learning | SELECT personal_name , family_name FROM Students ORDER BY family_name | What are the personal names and family names of the students? Sort the result in alphabetical order of the family name. | [Schema (values) (types)]: | e_learning | Course_Authors_and_Tutors : author_id (text) , author_tutor_atb (number) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (text) , date_of_registration (num... | [Primary Keys]: course_authors_and_tutors : author_id, students : student_id, subjects : subject_id, courses : course_id, student_course_enrolment : registration_id | [Foreign Keys]: courses : subject_id = subjects : subject_id | courses : author_id = course_authors_and_tutors : author_id | student_course_enrolment : student_id = students : student_id | student_course_enrolment : course_id = courses : course_id | student_tests_taken : registration_id = student_course_enrolment : reg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.