question string | answer string | context string | dialect string | spider_hardness string | extended_hardness string | classification_status string | syntax_status string | ddl_syntax_status string | schema_status string | syntax_errors list | ddl_syntax_errors list | schema_errors list | classification_errors list | status_history list | correction_status string | component1 int64 | component2 int64 | others int64 | validation_source dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
How many players born in USA are right-handed batters? That is, have the batter value 'R'. | SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R' | CREATE TABLE player (birth_country VARCHAR(255), bats VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2145
} |
What is the average height of the players from the college named 'Yale University'? | SELECT AVG(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University' | CREATE TABLE player_college (player_id VARCHAR(255), college_id VARCHAR(255)); CREATE TABLE player (height INTEGER, player_id VARCHAR(255)); CREATE TABLE college (college_id VARCHAR(255), name_full VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2146
} |
What is the highest salary among each team? List the team name, id and maximum salary. | SELECT T1.name, T1.team_id, MAX(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id | CREATE TABLE salary (salary INTEGER, team_id VARCHAR(255)); CREATE TABLE team (name VARCHAR(255), team_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2147
} |
What are the name and id of the team offering the lowest average salary? | SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) LIMIT 1 | CREATE TABLE team (name VARCHAR(255), team_id VARCHAR(255)); CREATE TABLE salary (team_id VARCHAR(255), salary INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2148
} |
Find the players' first name and last name who won award both in 1960 and in 1961. | SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961 | CREATE TABLE player (name_first VARCHAR(255), name_last VARCHAR(255)); CREATE TABLE player_award (year VARCHAR(255), player_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 1 | {
"split": "train",
"row_index": 2149
} |
List players' first name and last name who have weight greater than 220 or height shorter than 75. | SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75 | CREATE TABLE player (name_first VARCHAR(255), name_last VARCHAR(255), weight VARCHAR(255), height VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 2 | {
"split": "train",
"row_index": 2150
} |
List the maximum scores of the team Boston Red Stockings when the team won in postseason? | SELECT MAX(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' | CREATE TABLE team (team_id_br VARCHAR(255), name VARCHAR(255)); CREATE TABLE postseason (wins INTEGER, team_id_winner VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2151
} |
How many times did Boston Red Stockings lose in 2009 postseason? | SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009 | CREATE TABLE postseason (team_id_loser VARCHAR(255), year VARCHAR(255)); CREATE TABLE team (team_id_br VARCHAR(255), name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2152
} |
What are the name and id of the team with the most victories in 2008 postseason? | SELECT T2.name, T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE postseason (team_id_winner VARCHAR(255), year VARCHAR(255)); CREATE TABLE team (name VARCHAR(255), team_id_br VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 5 | 0 | 1 | {
"split": "train",
"row_index": 2153
} |
What is the number of wins the team Boston Red Stockings got in the postseasons each year in history? | SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year | CREATE TABLE team (team_id_br VARCHAR(255), name VARCHAR(255)); CREATE TABLE postseason (year VARCHAR(255), team_id_winner VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2154
} |
How many games in 1885 postseason resulted in ties (that is, the value of "ties" is '1')? | SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1 | CREATE TABLE postseason (YEAR VARCHAR(255), ties VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2156
} |
What is the total salary paid by team Boston Red Stockings in 2010? | SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010 | CREATE TABLE salary (salary INTEGER, team_id VARCHAR(255), year VARCHAR(255)); CREATE TABLE team (team_id_br VARCHAR(255), name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2157
} |
How many players were in the team Boston Red Stockings in 2000? | SELECT COUNT(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000 | CREATE TABLE salary (team_id VARCHAR(255), year VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE team (team_id_br VARCHAR(255), name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2158
} |
List the 3 highest salaries of the players in 2001? | SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3 | CREATE TABLE salary (salary VARCHAR(255), YEAR VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2159
} |
What were all the salary values of players in 2010 and 2001? | SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001 | CREATE TABLE salary (salary VARCHAR(255), YEAR VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2160
} |
In which year did the least people enter hall of fame? | SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) LIMIT 1 | CREATE TABLE hall_of_fame (yearid VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2161
} |
How many parks are there in Atlanta city? | SELECT COUNT(*) FROM park WHERE city = 'Atlanta' | CREATE TABLE park (city VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2162
} |
How many games were played in park "Columbia Park" in 1907? | SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park' | CREATE TABLE park (park_id VARCHAR(255), park_name VARCHAR(255)); CREATE TABLE home_game (park_id VARCHAR(255), year VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2163
} |
How many games were played in city Atlanta in 2000? | SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta' | CREATE TABLE park (park_id VARCHAR(255), city VARCHAR(255)); CREATE TABLE home_game (park_id VARCHAR(255), year VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2164
} |
What is the total home game attendance of team Boston Red Stockings from 2000 to 2010? | SELECT SUM(T1.attendance) 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 2000 AND 2010 | CREATE TABLE team (team_id_br VARCHAR(255), name VARCHAR(255)); CREATE TABLE home_game (attendance INTEGER, team_id VARCHAR(255), year VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2165
} |
How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total? | SELECT SUM(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990 | CREATE TABLE salary (salary INTEGER, player_id VARCHAR(255), year VARCHAR(255)); CREATE TABLE player (player_id VARCHAR(255), name_first VARCHAR(255), name_last VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2166
} |
List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007. | SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JO... | CREATE TABLE player (name_first VARCHAR(255), name_last VARCHAR(255), player_id VARCHAR(255)); CREATE TABLE team (team_id_br VARCHAR(255), name VARCHAR(255)); CREATE TABLE salary (player_id VARCHAR(255), team_id VARCHAR(255), year VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 2 | {
"split": "train",
"row_index": 2167
} |
How many home games did the team Boston Red Stockings play from 1990 to 2000 in total? | 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 | CREATE TABLE team (team_id_br VARCHAR(255), name VARCHAR(255)); CREATE TABLE home_game (games INTEGER, team_id VARCHAR(255), year VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2168
} |
Which team had the least number of attendances in home games in 1980? | SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance LIMIT 1 | CREATE TABLE home_game (team_id VARCHAR(255), year VARCHAR(255), attendance VARCHAR(255)); CREATE TABLE team (name VARCHAR(255), team_id_br VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 2169
} |
List the names of states that have more than 2 parks. | SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2 | CREATE TABLE park (state VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2170
} |
How many team franchises are active, with active value 'Y'? | SELECT COUNT(*) FROM team_franchise WHERE active = 'Y' | CREATE TABLE team_franchise (active VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2171
} |
Which cities have 2 to 4 parks? | SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4 | CREATE TABLE park (city VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2172
} |
Which park had most attendances in 2008? | SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1 | CREATE TABLE park (park_name VARCHAR(255), park_id VARCHAR(255)); CREATE TABLE home_game (park_id VARCHAR(255), year VARCHAR(255), attendance VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 2173
} |
How many camera lenses have a focal length longer than 15 mm? | SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15 | CREATE TABLE camera_lens (focal_length_mm INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2174
} |
Find the brand and name for each camera lens, and sort in descending order of maximum aperture. | SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC | CREATE TABLE camera_lens (brand VARCHAR(255), name VARCHAR(255), max_aperture VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2175
} |
List the id, color scheme, and name for all the photos. | SELECT id, color, name FROM photos | CREATE TABLE photos (id VARCHAR(255), color VARCHAR(255), name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 2176
} |
What are the maximum and average height of the mountains? | SELECT MAX(height), AVG(height) FROM mountain | CREATE TABLE mountain (height INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 2 | {
"split": "train",
"row_index": 2177
} |
What are the average prominence of the mountains in country 'Morocco'? | SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco' | CREATE TABLE mountain (prominence INTEGER, country VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2178
} |
What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'? | SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range' | CREATE TABLE mountain (name VARCHAR(255), height VARCHAR(255), prominence VARCHAR(255), range VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2179
} |
What are the id and name of the photos for mountains? | SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000 | CREATE TABLE photos (mountain_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE mountain (id VARCHAR(255), name VARCHAR(255), height INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2180
} |
What are the id and name of the mountains that have at least 2 photos? | SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id HAVING COUNT(*) >= 2 | CREATE TABLE mountain (id VARCHAR(255), name VARCHAR(255)); CREATE TABLE photos (mountain_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2181
} |
What are the names of the cameras that have taken picture of the most mountains? | SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE camera_lens (name VARCHAR(255), id VARCHAR(255)); CREATE TABLE photos (camera_lens_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 2182
} |
What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'? | SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' | CREATE TABLE photos (camera_lens_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE camera_lens (name VARCHAR(255), id VARCHAR(255), brand VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2183
} |
How many different kinds of lens brands are there? | SELECT COUNT(DISTINCT brand) FROM camera_lens | CREATE TABLE camera_lens (brand VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 2184
} |
How many camera lenses are not used in taking any photos? | SELECT COUNT(*) FROM camera_lens WHERE NOT id IN (SELECT camera_lens_id FROM photos) | CREATE TABLE photos (id VARCHAR(255), camera_lens_id VARCHAR(255)); CREATE TABLE camera_lens (id VARCHAR(255), camera_lens_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2185
} |
How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'? | SELECT COUNT(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia' | CREATE TABLE mountain (id VARCHAR(255), country VARCHAR(255)); CREATE TABLE photos (camera_lens_id VARCHAR(255), mountain_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2186
} |
List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif' | SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.rang... | CREATE TABLE mountain (id VARCHAR(255), range VARCHAR(255)); CREATE TABLE photos (mountain_id VARCHAR(255), camera_lens_id VARCHAR(255)); CREATE TABLE camera_lens (brand VARCHAR(255), id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 0 | {
"split": "train",
"row_index": 2187
} |
List the camera lens names containing substring "Digital". | SELECT name FROM camera_lens WHERE name LIKE '%Digital%' | CREATE TABLE camera_lens (name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2189
} |
What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos. | SELECT T1.name, COUNT(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY COUNT(*) | CREATE TABLE photos (camera_lens_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE camera_lens (name VARCHAR(255), id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 2190
} |
Find the names of channels that are not owned by CCTV. | SELECT name FROM channel WHERE OWNER <> 'CCTV' | CREATE TABLE channel (name VARCHAR(255), OWNER VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2191
} |
List all channel names ordered by their rating in percent from big to small. | SELECT name FROM channel ORDER BY rating_in_percent DESC | CREATE TABLE channel (name VARCHAR(255), rating_in_percent VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2192
} |
What is the owner of the channel that has the highest rating ratio? | SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1 | CREATE TABLE channel (OWNER VARCHAR(255), rating_in_percent VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2193
} |
how many programs are there? | SELECT COUNT(*) FROM program | CREATE TABLE program (Id VARCHAR(255), name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 2194
} |
list all the names of programs, ordering by launch time. | SELECT name FROM program ORDER BY launch | CREATE TABLE program (name VARCHAR(255), launch VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2195
} |
List the name, origin and owner of each program. | SELECT name, origin, OWNER FROM program | CREATE TABLE program (name VARCHAR(255), origin VARCHAR(255), OWNER VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 2196
} |
find the name of the program that was launched most recently. | SELECT name FROM program ORDER BY launch DESC LIMIT 1 | CREATE TABLE program (name VARCHAR(255), launch VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2197
} |
find the total percentage share of all channels owned by CCTV. | SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV' | CREATE TABLE channel (Share_in_percent INTEGER, OWNER VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2198
} |
Find the names of the channels that are broadcast in the morning. | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' | CREATE TABLE channel (name VARCHAR(255), channel_id VARCHAR(255)); CREATE TABLE broadcast (channel_id VARCHAR(255), time_of_day VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2199
} |
what are the names of the channels that broadcast in both morning and night? | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night' | CREATE TABLE channel (name VARCHAR(255), channel_id VARCHAR(255)); CREATE TABLE broadcast (channel_id VARCHAR(255), time_of_day VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 0 | {
"split": "train",
"row_index": 2200
} |
how many programs are broadcast in each time section of the day? | SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day | CREATE TABLE broadcast (time_of_day VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2201
} |
find the number of different programs that are broadcast during night time. | SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night' | CREATE TABLE broadcast (program_id VARCHAR(255), time_of_day VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2202
} |
find the program owners that have some programs in both morning and night time. | SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning' INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Night' | CREATE TABLE broadcast (program_id VARCHAR(255), Time_of_day VARCHAR(255)); CREATE TABLE program (owner VARCHAR(255), program_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 0 | {
"split": "train",
"row_index": 2204
} |
List all program origins in the alphabetical order. | SELECT origin FROM program ORDER BY origin | CREATE TABLE program (origin VARCHAR(255), name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2205
} |
what is the number of different channel owners? | SELECT COUNT(DISTINCT OWNER) FROM channel | CREATE TABLE channel (OWNER VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 2206
} |
find the names of programs whose origin is not in Beijing. | SELECT name FROM program WHERE origin <> 'Beijing' | CREATE TABLE program (name VARCHAR(255), origin VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2207
} |
What are the names of the channels owned by CCTV or HBS? | SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS' | CREATE TABLE channel (name VARCHAR(255), OWNER VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2208
} |
Find the total rating ratio for each channel owner. | SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER | CREATE TABLE channel (OWNER VARCHAR(255), Rating_in_percent INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2209
} |
Find the name of the program that is broadcast most frequently. | SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE program (name VARCHAR(255), program_id VARCHAR(255)); CREATE TABLE broadcast (program_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 2210
} |
How many courses are there in total? | SELECT COUNT(*) FROM COURSES | CREATE TABLE COURSES (Id VARCHAR(255), name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 2211
} |
What are the descriptions of the courses with name "database"? | SELECT course_description FROM COURSES WHERE course_name = 'database' | CREATE TABLE COURSES (course_description VARCHAR(255), course_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2212
} |
What are the addresses of the course authors or tutors with personal name "Cathrine" | SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine' | CREATE TABLE Course_Authors_and_Tutors (address_line_1 VARCHAR(255), personal_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2213
} |
List the addresses of all the course authors or tutors. | SELECT address_line_1 FROM Course_Authors_and_Tutors | CREATE TABLE Course_Authors_and_Tutors (address_line_1 VARCHAR(255), personal_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 2214
} |
List all the login names and family names of course author and tutors. | SELECT login_name, family_name FROM Course_Authors_and_Tutors | CREATE TABLE Course_Authors_and_Tutors (login_name VARCHAR(255), family_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 2215
} |
List all the dates of enrollment and completion of students. | SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment | CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR(255), date_of_completion VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 2216
} |
How many distinct students are enrolled in courses? | SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment | CREATE TABLE Student_Course_Enrolment (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 2217
} |
How many distinct courses are enrolled in by students? | SELECT COUNT(course_id) FROM Student_Course_Enrolment | CREATE TABLE Student_Course_Enrolment (course_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 2218
} |
Find the dates of the tests taken with result "Pass". | SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass' | CREATE TABLE Student_Tests_Taken (date_test_taken VARCHAR(255), test_result VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2219
} |
How many tests have result "Fail"? | SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail' | CREATE TABLE Student_Tests_Taken (test_result VARCHAR(255), date_test_taken VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2220
} |
What are the login names of the students with family name "Ward"? | SELECT login_name FROM Students WHERE family_name = 'Ward' | CREATE TABLE Students (login_name VARCHAR(255), family_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2221
} |
What are the dates of the latest logon of the students with family name "Jaskolski" or "Langosh"? | SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh' | CREATE TABLE Students (date_of_latest_logon VARCHAR(255), family_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2222
} |
How many students have personal names that contain the word "son"? | SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%' | CREATE TABLE Students (personal_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2223
} |
List all the subject names. | SELECT subject_name FROM SUBJECTS | CREATE TABLE SUBJECTS (subject_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 2224
} |
List the personal names and family names of all the students in alphabetical order of family name. | SELECT personal_name, family_name FROM Students ORDER BY family_name | CREATE TABLE Students (personal_name VARCHAR(255), family_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2226
} |
List each test result and its count in descending order of count. | SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC | CREATE TABLE Student_Tests_Taken (test_result VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 2 | {
"split": "train",
"row_index": 2227
} |
Find the login name of the course author that teaches the course with name "advanced database". | SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'advanced database' | CREATE TABLE Courses (author_id VARCHAR(255), course_name VARCHAR(255)); CREATE TABLE Course_Authors_and_Tutors (login_name VARCHAR(255), author_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2228
} |
Find the addresses of the course authors who teach the course with name "operating system" or "data structure". | SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'operating system' OR T2.course_name = 'data structure' | CREATE TABLE Courses (author_id VARCHAR(255), course_name VARCHAR(255)); CREATE TABLE Course_Authors_and_Tutors (address_line_1 VARCHAR(255), author_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2229
} |
Find the personal name, family name, and author ID of the course author that teaches the most courses. | SELECT T1.personal_name, T1.family_name, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Courses (author_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Course_Authors_and_Tutors (personal_name VARCHAR(255), family_name VARCHAR(255), author_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2230
} |
Find the addresses and author IDs of the course authors that teach at least two courses. | SELECT T1.address_line_1, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING COUNT(*) >= 2 | CREATE TABLE Courses (author_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Course_Authors_and_Tutors (address_line_1 VARCHAR(255), author_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2231
} |
Find the names of courses taught by the tutor who has personal name "Julio". | SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = 'Julio' | CREATE TABLE Course_Authors_and_Tutors (author_id VARCHAR(255), personal_name VARCHAR(255)); CREATE TABLE Courses (course_name VARCHAR(255), author_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2232
} |
Find the names and descriptions of courses that belong to the subject named "Computer Science". | SELECT T1.course_name, T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = 'Computer Science' | CREATE TABLE Courses (course_name VARCHAR(255), course_description VARCHAR(255), subject_id VARCHAR(255)); CREATE TABLE Subjects (subject_id VARCHAR(255), subject_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2233
} |
Find the subject ID, subject name, and the corresponding number of available courses for each subject. | SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id | CREATE TABLE Courses (subject_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Subjects (subject_name VARCHAR(255), subject_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2234
} |
Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order. | SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) | CREATE TABLE Courses (subject_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Subjects (subject_name VARCHAR(255), subject_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 2235
} |
What is the date of enrollment of the course named "Spanish"? | SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'Spanish' | CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR(255), course_id VARCHAR(255)); CREATE TABLE Courses (course_id VARCHAR(255), course_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2236
} |
What is the name of the course that has the most student enrollment? | SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Courses (course_name VARCHAR(255), course_id VARCHAR(255)); CREATE TABLE Student_Course_Enrolment (course_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 2237
} |
What are the names of the courses that have exactly 1 student enrollment? | SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1 | CREATE TABLE Courses (course_name VARCHAR(255), course_id VARCHAR(255)); CREATE TABLE Student_Course_Enrolment (course_id VARCHAR(255), student_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2238
} |
What are the descriptions and names of the courses that have student enrollment bigger than 2? | SELECT T1.course_description, T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2 | CREATE TABLE Student_Course_Enrolment (course_id VARCHAR(255), student_id VARCHAR(255)); CREATE TABLE Courses (course_description VARCHAR(255), course_name VARCHAR(255), course_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2239
} |
What is the name of each course and the corresponding number of student enrollment? | SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name | CREATE TABLE Courses (course_name VARCHAR(255), course_id VARCHAR(255)); CREATE TABLE Student_Course_Enrolment (course_id VARCHAR(255), student_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2240
} |
What are the enrollment dates of all the tests that have result "Pass"? | SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Pass' | CREATE TABLE Student_Tests_Taken (registration_id VARCHAR(255), test_result VARCHAR(255)); CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR(255), registration_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2241
} |
What are the completion dates of all the tests that have result "Fail"? | SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Fail' | CREATE TABLE Student_Tests_Taken (registration_id VARCHAR(255), test_result VARCHAR(255)); CREATE TABLE Student_Course_Enrolment (date_of_completion VARCHAR(255), registration_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2242
} |
List the dates of enrollment and completion of the student with personal name "Karson". | SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = 'Karson' | CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR(255), date_of_completion VARCHAR(255), student_id VARCHAR(255)); CREATE TABLE Students (student_id VARCHAR(255), personal_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2243
} |
List the dates of enrollment and completion of the student with family name "Zieme" and personal name "Bernie". | SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = 'Zieme' AND T2.personal_name = 'Bernie' | CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR(255), date_of_completion VARCHAR(255), student_id VARCHAR(255)); CREATE TABLE Students (student_id VARCHAR(255), family_name VARCHAR(255), personal_name VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 2 | {
"split": "train",
"row_index": 2244
} |
Find the student ID and login name of the student with the most course enrollments | SELECT T1.student_id, T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Student_Course_Enrolment (student_id VARCHAR(255), course_id VARCHAR(255)); CREATE TABLE Students (login_name VARCHAR(255), student_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2245
} |
Find the student ID and personal name of the student with at least two enrollments. | SELECT T1.student_id, T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2 | CREATE TABLE Student_Course_Enrolment (student_id VARCHAR(255), course_id VARCHAR(255)); CREATE TABLE Students (personal_name VARCHAR(255), student_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2246
} |
Find the student ID and middle name for all the students with at most two enrollments. | SELECT T1.student_id, T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2 | CREATE TABLE Student_Course_Enrolment (student_id VARCHAR(255), course_id VARCHAR(255)); CREATE TABLE Students (middle_name VARCHAR(255), student_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2247
} |
How many students did not have any course enrollment? | SELECT COUNT(*) FROM Students WHERE NOT student_id IN (SELECT student_id FROM Student_Course_Enrolment) | CREATE TABLE Students (student_id VARCHAR(255), name VARCHAR(255)); CREATE TABLE Student_Course_Enrolment (student_id VARCHAR(255), course_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2249
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.