cnatale/presto-athena-txt-2-sql huggingface dataset:
What are the maximum and minimum resolution of songs whose duration is 3 minutes?
Additional table information: table: music_1
SQL: SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '3:%'
What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?
Additional table information: table: music_1
SQL: SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '3:%'
What are the maximum duration and resolution of songs grouped and ordered by languages?
Additional table information: table: music_1
SQL: SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages NULLS FIRST
What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?
Additional table information: table: music_1
SQL: SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages NULLS FIRST
What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?
Additional table information: table: music_1
SQL: SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is NULLS FIRST
What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?
Additional table information: table: music_1
SQL: SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is NULLS FIRST
Find the names and number of works of all artists who have at least one English songs.
Additional table information: table: music_1
SQL: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' GROUP BY T2.artist_name HAVING COUNT(*) >= 1
What are the names and number of works for all artists who have sung at least one song in English?
Additional table information: table: music_1
SQL: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' GROUP BY T2.artist_name HAVING COUNT(*) >= 1
Find the name and country of origin for all artists who have release at least one song of resolution above 900.
Additional table information: table: music_1
SQL: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1
What is the name and country of origin for each artist who has released a song with a resolution higher than 900?
Additional table information: table: music_1
SQL: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1
Find the names and number of works of the three artists who have produced the most songs.
Additional table information: table: music_1
SQL: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3
What are the names of the three artists who have produced the most songs, and how many works did they produce?
Additional table information: table: music_1
SQL: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3
Find the country of origin for the artist who made the least number of songs?
Additional table information: table: music_1
SQL: SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) NULLS FIRST LIMIT 1
What country is the artist who made the fewest songs from?
Additional table information: table: music_1
SQL: SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) NULLS FIRST LIMIT 1
What are the names of the songs whose rating is below the rating of all songs in English?
Additional table information: table: music_1
SQL: SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english')
What are the song names for every song whose rating is less than the minimum rating for English songs?
Additional table information: table: music_1
SQL: SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english')
What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?
Additional table information: table: music_1
SQL: SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8)
What is the id of every song that has a resolution higher than that of a song with a rating below 8?
Additional table information: table: music_1
SQL: SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8)
What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?
Additional table information: table: music_1
SQL: SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern')
What are the ids of all songs that have higher resolution of the average resolution in the modern genre?
Additional table information: table: music_1
SQL: SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern')
Find the top 3 artists who have the largest number of songs works whose language is Bangla.
Additional table information: table: music_1
SQL: SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'bangla' GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3
What are the top 3 artists with the largest number of songs in the language Bangla?
Additional table information: table: music_1
SQL: SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'bangla' GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3
List the id, genre and artist name of English songs ordered by rating.
Additional table information: table: music_1
SQL: SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating NULLS FIRST
What is the id, genre, and name of the artist for every English song ordered by ascending rating?
Additional table information: table: music_1
SQL: SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating NULLS FIRST
List the duration, file size and format of songs whose genre is pop, ordered by title?
Additional table information: table: music_1
SQL: SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = 'pop' ORDER BY T2.song_name NULLS FIRST
What is the duration, file size, and song format for every pop song, ordered by title alphabetically?
Additional table information: table: music_1
SQL: SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = 'pop' ORDER BY T2.song_name NULLS FIRST
Find the names of the artists who have produced English songs but have never received rating higher than 8.
Additional table information: table: music_1
SQL: SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8
What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8?
Additional table information: table: music_1
SQL: SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8
Find the names of the artists who are from Bangladesh and have never received rating higher than 7.
Additional table information: table: music_1
SQL: SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7
What are the names of the different artists from Bangladesh who never received a rating higher than a 7?
Additional table information: table: music_1
SQL: SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7
what is the full name and id of the college with the largest number of baseball players?
Additional table information: table: baseball_1
SQL: SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY COUNT(*) DESC LIMIT 1
Find the full name and id of the college that has the most baseball players.
Additional table information: table: baseball_1
SQL: SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY COUNT(*) DESC LIMIT 1
What is average salary of the players in the team named 'Boston Red Stockings' ?
Additional table information: table: baseball_1
SQL: SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'
Compute the average salary of the players in the team called 'Boston Red Stockings'.
Additional table information: table: baseball_1
SQL: SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'
What are first and last names of players participating in all star game in 1998?
Additional table information: table: baseball_1
SQL: SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998
List the first and last name for players who participated in all star game in 1998.
Additional table information: table: baseball_1
SQL: SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998
What are the first name, last name and id of the player with the most all star game experiences? Also list the count.
Additional table information: table: baseball_1
SQL: SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1
Which player has the most all star game experiences? Give me the first name, last name and id of the player, as well as the number of times the player participated in all star game.
Additional table information: table: baseball_1
SQL: SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1
How many players enter hall of fame each year?
Additional table information: table: baseball_1
SQL: SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid
Count the number of players who enter hall of fame for each year.
Additional table information: table: baseball_1
SQL: SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid
What is the average number of attendance at home games for each year?
Additional table information: table: baseball_1
SQL: SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR
For each year, return the year and the average number of attendance at home games.
Additional table information: table: baseball_1
SQL: SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR
In 2014, what are the id and rank of the team that has the largest average number of attendance?
Additional table information: table: baseball_1
SQL: SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY AVG(T1.attendance) DESC LIMIT 1
Find the id and rank of the team that has the highest average attendance rate in 2014.
Additional table information: table: baseball_1
SQL: SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY AVG(T1.attendance) DESC LIMIT 1
What are the manager's first name, last name and id who won the most manager award?
Additional table information: table: baseball_1
SQL: SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1
Which manager won the most manager award? Give me the manager's first name, last name and id.
Additional table information: table: baseball_1
SQL: SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1
How many parks are there in the state of NY?
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM park WHERE state = 'NY'
Show me the number of parks the state of NY has.
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM park WHERE state = 'NY'
Which 3 players won the most player awards? List their full name and id.
Additional table information: table: baseball_1
SQL: SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 3
Find the first name, last name and id for the top three players won the most player awards.
Additional table information: table: baseball_1
SQL: SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 3
List three countries which are the origins of the least players.
Additional table information: table: baseball_1
SQL: SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 3
What are the three countries that the least players are from?
Additional table information: table: baseball_1
SQL: SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 3
Find all the players' first name and last name who have empty death record.
Additional table information: table: baseball_1
SQL: SELECT name_first, name_last FROM player WHERE death_year = ''
What are the first name and last name of the players whose death record is empty?
Additional table information: table: baseball_1
SQL: SELECT name_first, name_last FROM player WHERE death_year = ''
How many players born in USA are right-handed batters? That is, have the batter value 'R'.
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'
Count the number of players who were born in USA and have bats information 'R'.
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'
What is the average height of the players from the college named 'Yale University'?
Additional table information: table: baseball_1
SQL: 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'
Find the average height of the players who belong to the college called 'Yale University'.
Additional table information: table: baseball_1
SQL: 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'
What is the highest salary among each team? List the team name, id and maximum salary.
Additional table information: table: baseball_1
SQL: 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
For each team, return the team name, id and the maximum salary among the team.
Additional table information: table: baseball_1
SQL: 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
What are the name and id of the team offering the lowest average salary?
Additional table information: table: baseball_1
SQL: 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) ASC NULLS FIRST LIMIT 1
Which team offers the lowest average salary? Give me the name and id of the team.
Additional table information: table: baseball_1
SQL: 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) ASC NULLS FIRST LIMIT 1
Find the players' first name and last name who won award both in 1960 and in 1961.
Additional table information: table: baseball_1
SQL: SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1961
Which players won awards in both 1960 and 1961? Return their first names and last names.
Additional table information: table: baseball_1
SQL: SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1961
List players' first name and last name who have weight greater than 220 or height shorter than 75.
Additional table information: table: baseball_1
SQL: SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75
What are the first name and last name of the players who have weight above 220 or height below 75?
Additional table information: table: baseball_1
SQL: SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75
List the maximum scores of the team Boston Red Stockings when the team won in postseason?
Additional table information: table: baseball_1
SQL: 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'
What are the maximum scores the team Boston Red Stockings got when the team won in postseason?
Additional table information: table: baseball_1
SQL: 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'
How many times did Boston Red Stockings lose in 2009 postseason?
Additional table information: table: baseball_1
SQL: 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
Count the number of times the team 'Boston Red Stockings' lost in 2009 postseason.
Additional table information: table: baseball_1
SQL: 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
What are the name and id of the team with the most victories in 2008 postseason?
Additional table information: table: baseball_1
SQL: 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
Find the name and id of the team that won the most times in 2008 postseason.
Additional table information: table: baseball_1
SQL: 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
What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?
Additional table information: table: baseball_1
SQL: 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
For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.
Additional table information: table: baseball_1
SQL: 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
What is the total number of postseason games that team Boston Red Stockings participated in?
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings')
How many times in total did the team Boston Red Stockings participate in postseason games?
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings')
How many games in 1885 postseason resulted in ties (that is, the value of 'ties' is '1')?
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1
Find the number of tied games (the value of 'ties' is '1') in 1885 postseason.
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1
What is the total salary paid by team Boston Red Stockings in 2010?
Additional table information: table: baseball_1
SQL: 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
What is the total salary expenses of team Boston Red Stockings in 2010?
Additional table information: table: baseball_1
SQL: 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
How many players were in the team Boston Red Stockings in 2000?
Additional table information: table: baseball_1
SQL: 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
How many players did Boston Red Stockings have in 2000?
Additional table information: table: baseball_1
SQL: 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
List the 3 highest salaries of the players in 2001?
Additional table information: table: baseball_1
SQL: SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3
How much salary did the top 3 well-paid players get in 2001?
Additional table information: table: baseball_1
SQL: SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3
What were all the salary values of players in 2010 and 2001?
Additional table information: table: baseball_1
SQL: SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001
List all the salary values players received in 2010 and 2001.
Additional table information: table: baseball_1
SQL: SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001
In which year did the least people enter hall of fame?
Additional table information: table: baseball_1
SQL: SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1
Find the year in which the least people enter hall of fame.
Additional table information: table: baseball_1
SQL: SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1
How many parks are there in Atlanta city?
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM park WHERE city = 'Atlanta'
How many parks does Atlanta city have?
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM park WHERE city = 'Atlanta'
How many games were played in park 'Columbia Park' in 1907?
Additional table information: table: baseball_1
SQL: 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'
Count the number of games taken place in park 'Columbia Park' in 1907.
Additional table information: table: baseball_1
SQL: 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'
How many games were played in city Atlanta in 2000?
Additional table information: table: baseball_1
SQL: 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'
Find the number of games taken place in city Atlanta in 2000.
Additional table information: table: baseball_1
SQL: 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'
What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?
Additional table information: table: baseball_1
SQL: 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
How many games in total did team Boston Red Stockings attend from 2000 to 2010?
Additional table information: table: baseball_1
SQL: 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
How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?
Additional table information: table: baseball_1
SQL: 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
Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.
Additional table information: table: baseball_1
SQL: 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
List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.
Additional table information: table: baseball_1
SQL: 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 JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'
What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?
Additional table information: table: baseball_1
SQL: 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 JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'
How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?
Additional table information: table: baseball_1
SQL: 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.
Additional table information: table: baseball_1
SQL: 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
Which team had the least number of attendances in home games in 1980?
Additional table information: table: baseball_1
SQL: 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 NULLS FIRST LIMIT 1
Find the team that attended the least number of home games in 1980.
Additional table information: table: baseball_1
SQL: 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 NULLS FIRST LIMIT 1
List the names of states that have more than 2 parks.
Additional table information: table: baseball_1
SQL: SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2
Which states have more than 2 parks?
Additional table information: table: baseball_1
SQL: SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2
How many team franchises are active, with active value 'Y'?
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM team_franchise WHERE active = 'Y'
Find the number of team franchises that are active (have 'Y' as 'active' information).
Additional table information: table: baseball_1
SQL: SELECT COUNT(*) FROM team_franchise WHERE active = 'Y'
Which cities have 2 to 4 parks?
Additional table information: table: baseball_1
SQL: SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4
Find all the cities that have 2 to 4 parks.
Additional table information: table: baseball_1
SQL: SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4
Which park had most attendances in 2008?
Additional table information: table: baseball_1
SQL: 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?
Additional table information: table: baseball_1
SQL: 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
How many camera lenses have a focal length longer than 15 mm?
Additional table information: table: mountain_photos
SQL: SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15
Find the brand and name for each camera lens, and sort in descending order of maximum aperture.
Additional table information: table: mountain_photos
SQL: SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC
List the id, color scheme, and name for all the photos.
Additional table information: table: mountain_photos
SQL: SELECT id, color, name FROM photos
What are the maximum and average height of the mountains?
Additional table information: table: mountain_photos
SQL: SELECT MAX(height), AVG(height) FROM mountain
What are the average prominence of the mountains in country 'Morocco'?
Additional table information: table: mountain_photos
SQL: SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco'
What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?
Additional table information: table: mountain_photos
SQL: SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range'
What are the id and name of the photos for mountains?
Additional table information: table: mountain_photos
SQL: 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 mountains that have at least 2 photos?
Additional table information: table: mountain_photos
SQL: 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 names of the cameras that have taken picture of the most mountains?
Additional table information: table: mountain_photos
SQL: 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 photos taken with the lens brand 'Sigma' or 'Olympus'?
Additional table information: table: mountain_photos
SQL: 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'
How many different kinds of lens brands are there?
Additional table information: table: mountain_photos
SQL: SELECT COUNT(DISTINCT brand) FROM camera_lens
How many camera lenses are not used in taking any photos?
Additional table information: table: mountain_photos
SQL: SELECT COUNT(*) FROM camera_lens WHERE NOT id IN (SELECT camera_lens_id FROM photos)
How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?
Additional table information: table: mountain_photos
SQL: 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'
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'
Additional table information: table: mountain_photos
SQL: 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.range = 'Lasta Massif'
Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.
Additional table information: table: mountain_photos
SQL: 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'
List the camera lens names containing substring 'Digital'.
Additional table information: table: mountain_photos
SQL: SELECT name FROM camera_lens WHERE name LIKE '%Digital%'
What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos.
Additional table information: table: mountain_photos
SQL: 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(*) NULLS FIRST
Find the names of channels that are not owned by CCTV.
Additional table information: table: program_share
SQL: SELECT name FROM channel WHERE OWNER <> 'CCTV'
Which channels are not owned by CCTV? Give me the channel names.
Additional table information: table: program_share
SQL: SELECT name FROM channel WHERE OWNER <> 'CCTV'
List all channel names ordered by their rating in percent from big to small.
Additional table information: table: program_share
SQL: 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.
Additional table information: table: program_share
SQL: SELECT name FROM channel ORDER BY rating_in_percent DESC
What is the owner of the channel that has the highest rating ratio?
Additional table information: table: program_share
SQL: SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1
Show me the owner of the channel with the highest rating.
Additional table information: table: program_share
SQL: SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1
how many programs are there?
Additional table information: table: program_share
SQL: SELECT COUNT(*) FROM program
Count the number of programs.
Additional table information: table: program_share
SQL: SELECT COUNT(*) FROM program
list all the names of programs, ordering by launch time.
Additional table information: table: program_share
SQL: SELECT name FROM program ORDER BY launch NULLS FIRST
What is the list of program names, sorted by the order of launch date?
Additional table information: table: program_share
SQL: SELECT name FROM program ORDER BY launch NULLS FIRST
List the name, origin and owner of each program.
Additional table information: table: program_share
SQL: SELECT name, origin, OWNER FROM program
What are the name, origin and owner of each program?
Additional table information: table: program_share
SQL: SELECT name, origin, OWNER FROM program
find the name of the program that was launched most recently.
Additional table information: table: program_share
SQL: SELECT name FROM program ORDER BY launch DESC LIMIT 1
Which program was launched most recently? Return the program name.
Additional table information: table: program_share
SQL: SELECT name FROM program ORDER BY launch DESC LIMIT 1
find the total percentage share of all channels owned by CCTV.
Additional table information: table: program_share
SQL: SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'
What is the total share (in percent) of all the channels owned by CCTV?
Additional table information: table: program_share
SQL: SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'
Find the names of the channels that are broadcast in the morning.
Additional table information: table: program_share
SQL: 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.
Additional table information: table: program_share
SQL: SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'
what are the names of the channels that broadcast in both morning and night?
Additional table information: table: program_share
SQL: 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.
Additional table information: table: program_share
SQL: 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'
how many programs are broadcast in each time section of the day?
Additional table information: table: program_share
SQL: 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.
Additional table information: table: program_share
SQL: SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day
find the number of different programs that are broadcast during night time.
Additional table information: table: program_share
SQL: SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'
How many distinct programs are broadcast at 'Night' time?
Additional table information: table: program_share
SQL: SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'
Find the names of programs that are never broadcasted in the morning.
Additional table information: table: program_share
SQL: 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.
Additional table information: table: program_share
SQL: 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 program owners that have some programs in both morning and night time.
Additional table information: table: program_share
SQL: 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?
Additional table information: table: program_share
SQL: 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'
List all program origins in the alphabetical order.
Additional table information: table: program_share
SQL: SELECT origin FROM program ORDER BY origin NULLS FIRST
What is the list of program origins ordered alphabetically?
Additional table information: table: program_share
SQL: SELECT origin FROM program ORDER BY origin NULLS FIRST
what is the number of different channel owners?
Additional table information: table: program_share
SQL: SELECT COUNT(DISTINCT OWNER) FROM channel
Count the number of distinct channel owners.
Additional table information: table: program_share
SQL: SELECT COUNT(DISTINCT OWNER) FROM channel
find the names of programs whose origin is not in Beijing.
Additional table information: table: program_share
SQL: SELECT name FROM program WHERE origin <> 'Beijing'
Which programs' origins are not 'Beijing'? Give me the program names.
Additional table information: table: program_share
SQL: SELECT name FROM program WHERE origin <> 'Beijing'
What are the names of the channels owned by CCTV or HBS?
Additional table information: table: program_share
SQL: SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'
List the names of all the channels owned by either CCTV or HBS
Additional table information: table: program_share
SQL: SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'
Find the total rating ratio for each channel owner.
Additional table information: table: program_share
SQL: SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER
What is the total rating of channel for each channel owner?
Additional table information: table: program_share
SQL: SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER
Find the name of the program that is broadcast most frequently.
Additional table information: table: program_share
SQL: 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.
Additional table information: table: program_share
SQL: 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
How many courses are there in total?
Additional table information: table: e_learning
SQL: SELECT COUNT(*) FROM COURSES
Find the total number of courses offered.
Additional table information: table: e_learning
SQL: SELECT COUNT(*) FROM COURSES
What are the descriptions of the courses with name 'database'?
Additional table information: table: e_learning
SQL: SELECT course_description FROM COURSES WHERE course_name = 'database'
Return the description for the courses named 'database'.
Additional table information: table: e_learning
SQL: SELECT course_description FROM COURSES WHERE course_name = 'database'
What are the addresses of the course authors or tutors with personal name 'Cathrine'
Additional table information: table: e_learning
SQL: 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'.
Additional table information: table: e_learning
SQL: SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine'
List the addresses of all the course authors or tutors.
Additional table information: table: e_learning
SQL: SELECT address_line_1 FROM Course_Authors_and_Tutors
What is the address of each course author or tutor?
Additional table information: table: e_learning
SQL: SELECT address_line_1 FROM Course_Authors_and_Tutors
List all the login names and family names of course author and tutors.
Additional table information: table: e_learning
SQL: SELECT login_name, family_name FROM Course_Authors_and_Tutors
What are the login names and family names of course author and tutors?
Additional table information: table: e_learning
SQL: SELECT login_name, family_name FROM Course_Authors_and_Tutors
List all the dates of enrollment and completion of students.
Additional table information: table: e_learning
SQL: SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment
What are all the dates of enrollment and completion in record?
Additional table information: table: e_learning
SQL: SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment
How many distinct students are enrolled in courses?
Additional table information: table: e_learning
SQL: SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment
Find the number of distinct students enrolled in courses.
Additional table information: table: e_learning
SQL: SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment
How many distinct courses are enrolled in by students?
Additional table information: table: e_learning
SQL: SELECT COUNT(course_id) FROM Student_Course_Enrolment
Find the number of distinct courses that have enrolled students.
Additional table information: table: e_learning
SQL: SELECT COUNT(course_id) FROM Student_Course_Enrolment
Find the dates of the tests taken with result 'Pass'.
Additional table information: table: e_learning
SQL: 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.
Additional table information: table: e_learning
SQL: SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass'
How many tests have result 'Fail'?
Additional table information: table: e_learning
SQL: SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail'
Count the number of tests with 'Fail' result.
Additional table information: table: e_learning
SQL: SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail'
What are the login names of the students with family name 'Ward'?
Additional table information: table: e_learning
SQL: SELECT login_name FROM Students WHERE family_name = 'Ward'
Return the login names of the students whose family name is 'Ward'.
Additional table information: table: e_learning
SQL: SELECT login_name FROM Students WHERE family_name = 'Ward'
What are the dates of the latest logon of the students with family name 'Jaskolski' or 'Langosh'?
Additional table information: table: e_learning
SQL: 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'.
Additional table information: table: e_learning
SQL: SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh'
How many students have personal names that contain the word 'son'?
Additional table information: table: e_learning
SQL: SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%'
Find the number of students who have the word 'son' in their personal names.
Additional table information: table: e_learning
SQL: SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%'
List all the subject names.
Additional table information: table: e_learning
SQL: SELECT subject_name FROM SUBJECTS
What are the names of all the subjects.
Additional table information: table: e_learning
SQL: SELECT subject_name FROM SUBJECTS
List all the information about course authors and tutors in alphabetical order of the personal name.
Additional table information: table: e_learning
SQL: SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name NULLS FIRST
Sort the information about course authors and tutors in alphabetical order of the personal name.
Additional table information: table: e_learning
SQL: SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name NULLS FIRST
List the personal names and family names of all the students in alphabetical order of family name.
Additional table information: table: e_learning
SQL: SELECT personal_name, family_name FROM Students ORDER BY family_name NULLS FIRST
What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.
Additional table information: table: e_learning
SQL: SELECT personal_name, family_name FROM Students ORDER BY family_name NULLS FIRST
List each test result and its count in descending order of count.
Additional table information: table: e_learning
SQL: SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC