target-benchmark/spider-queries huggingface dataset:
Database: course_teach (tables: teacher, course_arrange)
Question: What are the names of the teachers whose courses have not been arranged?
SQL: SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)
Database: museum_visit (tables: visitor)
Question: How many visitors below age 30 are there?
SQL: SELECT count(*) FROM visitor WHERE age  <  30
Database: museum_visit (tables: visitor)
Question: Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.
SQL: SELECT name FROM visitor WHERE Level_of_membership  >  4 ORDER BY Level_of_membership DESC
Database: museum_visit (tables: visitor)
Question: What is the average age of the visitors whose membership level is not higher than 4?
SQL: SELECT avg(age) FROM visitor WHERE Level_of_membership  <=  4
Database: museum_visit (tables: visitor)
Question: Find the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young.
SQL: SELECT name ,  Level_of_membership FROM visitor WHERE Level_of_membership  >  4 ORDER BY age DESC
Database: museum_visit (tables: museum)
Question: Find the id and name of the museum that has the most staff members?
SQL: SELECT museum_id ,  name FROM museum ORDER BY num_of_staff DESC LIMIT 1
Database: museum_visit (tables: museum)
Question: Find the average number of staff working for the museums that were open before 2009.
SQL: SELECT avg(num_of_staff) FROM museum WHERE open_year  <  2009
Database: museum_visit (tables: museum)
Question: What are the opening year and staff number of the museum named Plaza Museum?
SQL: SELECT Num_of_Staff ,  Open_Year FROM museum WHERE name  =  'Plaza Museum'
Database: museum_visit (tables: museum)
Question: find the names of museums which have more staff than the minimum staff number of all museums opened after 2010.
SQL: SELECT name FROM museum WHERE num_of_staff  >  (SELECT min(num_of_staff) FROM museum WHERE open_year  >  2010)
Database: museum_visit (tables: visit, visitor)
Question: find the id, name and age for visitors who visited some museums more than once.
SQL: SELECT t1.id ,  t1.name ,  t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id GROUP BY t1.id HAVING count(*)  >  1
Database: museum_visit (tables: visit, visitor)
Question: What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?
SQL: SELECT t2.visitor_id ,  t1.name ,  t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id GROUP BY t2.visitor_id ORDER BY sum(t2.Total_spent) DESC LIMIT 1
Database: museum_visit (tables: visit, museum)
Question: What are the id and name of the museum visited most times?
SQL: SELECT t2.Museum_ID ,  t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID  =  t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY count(*) DESC LIMIT 1
Database: museum_visit (tables: visit, museum)
Question: What is the name of the museum that had no visitor yet?
SQL: SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)
Database: museum_visit (tables: visit, visitor)
Question: Find the name and age of the visitor who bought the most tickets at once.
SQL: SELECT t1.name ,  t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1
Database: museum_visit (tables: visit)
Question: What are the average and maximum number of tickets bought in all visits?
SQL: SELECT avg(num_of_ticket) ,  max(num_of_ticket) FROM visit
Database: museum_visit (tables: visit, visitor)
Question: What is the total ticket expense of the visitors whose membership level is 1?
SQL: SELECT sum(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id WHERE t1.Level_of_membership  =  1
Database: museum_visit (tables: visit, visitor, museum)
Question: What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?
SQL: SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID  =  t2.Museum_ID WHERE t3.open_year  <  2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID  =  t2.Museum_ID WHERE t3.open_year  >  2011
Database: museum_visit (tables: visit, visitor, museum)
Question: Find the number of visitors who did not visit any museum opened after 2010.
SQL: SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID  =  t2.Museum_ID WHERE t1.open_year  >  2010)
Database: museum_visit (tables: museum)
Question: How many museums were opened after 2013 or before 2008?
SQL: SELECT count(*) FROM museum WHERE open_year  >  2013 OR open_year  <  2008
Database: wta_1 (tables: players)
Question: Find the total number of players.
SQL: SELECT count(*) FROM players
Database: wta_1 (tables: players)
Question: How many players are there?
SQL: SELECT count(*) FROM players
Database: wta_1 (tables: matches)
Question: Find the total number of matches.
SQL: SELECT count(*) FROM matches
Database: wta_1 (tables: matches)
Question: Count the number of matches.
SQL: SELECT count(*) FROM matches
Database: wta_1 (tables: players)
Question: List the first name and birth date of all players from the country with code USA.
SQL: SELECT first_name ,  birth_date FROM players WHERE country_code  =  'USA'
Database: wta_1 (tables: players)
Question: What are the first names and birth dates of players from the USA?
SQL: SELECT first_name ,  birth_date FROM players WHERE country_code  =  'USA'
Database: wta_1 (tables: matches)
Question: Find the average age of losers and winners of all matches.
SQL: SELECT avg(loser_age) ,  avg(winner_age) FROM matches
Database: wta_1 (tables: matches)
Question: What are the average ages of losers and winners across matches?
SQL: SELECT avg(loser_age) ,  avg(winner_age) FROM matches
Database: wta_1 (tables: matches)
Question: Find the average rank of winners in all matches.
SQL: SELECT avg(winner_rank) FROM matches
Database: wta_1 (tables: matches)
Question: What is the average rank for winners in all matches?
SQL: SELECT avg(winner_rank) FROM matches
Database: wta_1 (tables: matches)
Question: Find the highest rank of losers in all matches.
SQL: SELECT min(loser_rank) FROM matches
Database: wta_1 (tables: matches)
Question: What is the best rank of losers across all matches?
SQL: SELECT min(loser_rank) FROM matches
Database: wta_1 (tables: players)
Question: find the number of distinct country codes of all players.
SQL: SELECT count(DISTINCT country_code) FROM players
Database: wta_1 (tables: players)
Question: How many distinct countries do players come from?
SQL: SELECT count(DISTINCT country_code) FROM players
Database: wta_1 (tables: matches)
Question: Find the number of distinct name of losers.
SQL: SELECT count(DISTINCT loser_name) FROM matches
Database: wta_1 (tables: matches)
Question: How many different loser names are there?
SQL: SELECT count(DISTINCT loser_name) FROM matches
Database: wta_1 (tables: matches)
Question: Find the name of tourney that has more than 10 matches.
SQL: SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*)  >  10
Database: wta_1 (tables: matches)
Question: What are the names of tournaments that have more than 10 matches?
SQL: SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*)  >  10
Database: wta_1 (tables: matches)
Question: List the names of all winners who played in both 2013 and 2016.
SQL: SELECT winner_name FROM matches WHERE YEAR  =  2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR  =  2016
Database: wta_1 (tables: matches)
Question: What are the names of players who won in both 2013 and 2016?
SQL: SELECT winner_name FROM matches WHERE YEAR  =  2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR  =  2016
Database: wta_1 (tables: matches)
Question: List the number of all matches who played in years of 2013 or 2016.
SQL: SELECT count(*) FROM matches WHERE YEAR  =  2013 OR YEAR  =  2016
Database: wta_1 (tables: matches)
Question: How many matches were played in 2013 or 2016?
SQL: SELECT count(*) FROM matches WHERE YEAR  =  2013 OR YEAR  =  2016
Database: wta_1 (tables: players, matches)
Question: What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?
SQL: SELECT T1.country_code ,  T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id WHERE T2.tourney_name  =  'WTA Championships' INTERSECT SELECT T1.country_code ,  T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id WHERE T2.tourney_name  =  'Australian Open'
Database: wta_1 (tables: players, matches)
Question: What are the first names and country codes for players who won both the WTA Championships and the Australian Open?
SQL: SELECT T1.country_code ,  T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id WHERE T2.tourney_name  =  'WTA Championships' INTERSECT SELECT T1.country_code ,  T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id WHERE T2.tourney_name  =  'Australian Open'
Database: wta_1 (tables: players)
Question: Find the first name and country code of the oldest player.
SQL: SELECT first_name ,  country_code FROM players ORDER BY birth_date LIMIT 1
Database: wta_1 (tables: players)
Question: What is the first name and country code of the oldest player?
SQL: SELECT first_name ,  country_code FROM players ORDER BY birth_date LIMIT 1
Database: wta_1 (tables: players)
Question: List the first and last name of all players in the order of birth date.
SQL: SELECT first_name ,  last_name FROM players ORDER BY birth_date
Database: wta_1 (tables: players)
Question: What are the full names of all players, sorted by birth date?
SQL: SELECT first_name ,  last_name FROM players ORDER BY birth_date
Database: wta_1 (tables: players)
Question: List the first and last name of all players who are left / L hand in the order of birth date.
SQL: SELECT first_name ,  last_name FROM players WHERE hand  =  'L' ORDER BY birth_date
Database: wta_1 (tables: players)
Question: What are the full names of all left handed players, in order of birth date?
SQL: SELECT first_name ,  last_name FROM players WHERE hand  =  'L' ORDER BY birth_date
Database: wta_1 (tables: rankings, players)
Question: Find the first name and country code of the player who did the most number of tours.
SQL: SELECT T1.country_code ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id ORDER BY T2.tours DESC LIMIT 1
Database: wta_1 (tables: rankings, players)
Question: What is the first name and country code of the player with the most tours?
SQL: SELECT T1.country_code ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id ORDER BY T2.tours DESC LIMIT 1
Database: wta_1 (tables: matches)
Question: Find the year that has the most number of matches.
SQL: SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Database: wta_1 (tables: matches)
Question: Which year had the most matches?
SQL: SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Database: wta_1 (tables: matches)
Question: Find the name and rank points of the winner who won the most times.
SQL: SELECT winner_name ,  winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1
Database: wta_1 (tables: matches)
Question: What is the name of the winner who has won the most matches, and how many rank points does this player have?
SQL: SELECT winner_name ,  winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1
Database: wta_1 (tables: matches)
Question: Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.
SQL: SELECT winner_name FROM matches WHERE tourney_name  =  'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1
Database: wta_1 (tables: matches)
Question: What is the name of the winner with the most rank points who participated in the Australian Open tournament?
SQL: SELECT winner_name FROM matches WHERE tourney_name  =  'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1
Database: wta_1 (tables: matches)
Question: find the names of loser and winner who played in the match with greatest number of minutes.
SQL: SELECT winner_name ,  loser_name FROM matches ORDER BY minutes DESC LIMIT 1
Database: wta_1 (tables: matches)
Question: What are the names of the winner and loser who played in the longest match?
SQL: SELECT winner_name ,  loser_name FROM matches ORDER BY minutes DESC LIMIT 1
Database: wta_1 (tables: rankings, players)
Question: Find the average ranking for each player and their first name.
SQL: SELECT avg(ranking) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name
Database: wta_1 (tables: rankings, players)
Question: What are the first names of all players, and their average rankings?
SQL: SELECT avg(ranking) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name
Database: wta_1 (tables: rankings, players)
Question: Find the total ranking points for each player and their first name.
SQL: SELECT sum(ranking_points) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name
Database: wta_1 (tables: rankings, players)
Question: What are the first names of all players, and their total ranking points?
SQL: SELECT sum(ranking_points) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name
Database: wta_1 (tables: players)
Question: find the number of players for each country.
SQL: SELECT count(*) ,  country_code FROM players GROUP BY country_code
Database: wta_1 (tables: players)
Question: How many players are from each country?
SQL: SELECT count(*) ,  country_code FROM players GROUP BY country_code
Database: wta_1 (tables: players)
Question: find the code of the country where has the greatest number of players.
SQL: SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1
Database: wta_1 (tables: players)
Question: What is the code of the country with the most players?
SQL: SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1
Database: wta_1 (tables: players)
Question: Find the codes of countries that have more than 50 players.
SQL: SELECT country_code FROM players GROUP BY country_code HAVING count(*)  >  50
Database: wta_1 (tables: players)
Question: What are the codes of countries with more than 50 players?
SQL: SELECT country_code FROM players GROUP BY country_code HAVING count(*)  >  50
Database: wta_1 (tables: rankings)
Question: Find the total number of tours for each ranking date.
SQL: SELECT sum(tours) ,  ranking_date FROM rankings GROUP BY ranking_date
Database: wta_1 (tables: rankings)
Question: How many total tours were there for each ranking date?
SQL: SELECT sum(tours) ,  ranking_date FROM rankings GROUP BY ranking_date
Database: wta_1 (tables: matches)
Question: Find the number of matches happened in each year.
SQL: SELECT count(*) ,  YEAR FROM matches GROUP BY YEAR
Database: wta_1 (tables: matches)
Question: How many matches were played in each year?
SQL: SELECT count(*) ,  YEAR FROM matches GROUP BY YEAR
Database: wta_1 (tables: matches)
Question: Find the name and rank of the 3 youngest winners across all matches.
SQL: SELECT DISTINCT winner_name ,  winner_rank FROM matches ORDER BY winner_age LIMIT 3
Database: wta_1 (tables: matches)
Question: What are the names and ranks of the three youngest winners across all matches?
SQL: SELECT DISTINCT winner_name ,  winner_rank FROM matches ORDER BY winner_age LIMIT 3
Database: wta_1 (tables: matches)
Question: How many different winners both participated in the WTA Championships and were left handed?
SQL: SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name  =  'WTA Championships' AND winner_hand  =  'L'
Database: wta_1 (tables: matches)
Question: Find the number of left handed winners who participated in the WTA Championships.
SQL: SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name  =  'WTA Championships' AND winner_hand  =  'L'
Database: wta_1 (tables: players, matches)
Question: Find the first name, country code and birth date of the winner who has the highest rank points in all matches.
SQL: SELECT T1.first_name ,  T1.country_code ,  T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1
Database: wta_1 (tables: players, matches)
Question: What is the first name, country code, and birth date of the player with the most winner rank points across all matches?
SQL: SELECT T1.first_name ,  T1.country_code ,  T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1
Database: wta_1 (tables: players)
Question: Find the number of players for each hand type.
SQL: SELECT count(*) ,  hand FROM players GROUP BY hand
Database: wta_1 (tables: players)
Question: How many players are there for each hand type?
SQL: SELECT count(*) ,  hand FROM players GROUP BY hand
Database: battle_death (tables: ship)
Question: How many ships ended up being 'Captured'?
SQL: SELECT count(*) FROM ship WHERE disposition_of_ship  =  'Captured'
Database: battle_death (tables: ship)
Question: List the name and tonnage ordered by in descending alphaetical order for the names.
SQL: SELECT name ,  tonnage FROM ship ORDER BY name DESC
Database: battle_death (tables: battle)
Question: List the name, date and result of each battle.
SQL: SELECT name ,  date FROM battle
Database: battle_death (tables: death)
Question: What is maximum and minimum death toll caused each time?
SQL: SELECT max(killed) ,  min(killed) FROM death
Database: battle_death (tables: death)
Question: What is the average number of injuries caused each time?
SQL: SELECT avg(injured) FROM death
Database: battle_death (tables: ship, death)
Question: What are the death and injury situations caused by the ship with tonnage 't'?
SQL: SELECT T1.killed ,  T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id  =  T2.id WHERE T2.tonnage  =  't'
Database: battle_death (tables: battle)
Question: What are the name and results of the battles when the bulgarian commander is not 'Boril'
SQL: SELECT name ,  RESULT FROM battle WHERE bulgarian_commander != 'Boril'
Database: battle_death (tables: battle, ship)
Question: What are the different ids and names of the battles that lost any 'Brig' type shipes?
SQL: SELECT DISTINCT T1.id ,  T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.ship_type  =  'Brig'
Database: battle_death (tables: death, battle, ship)
Question: What are the ids and names of the battles that led to more than 10 people killed in total.
SQL: SELECT T1.id ,  T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle JOIN death AS T3 ON T2.id  =  T3.caused_by_ship_id GROUP BY T1.id HAVING sum(T3.killed)  >  10
Database: battle_death (tables: ship, death)
Question: What is the ship id and name that caused most total injuries?
SQL: SELECT T2.id ,  T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id  =  T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1
Database: battle_death (tables: battle)
Question: What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?
SQL: SELECT name FROM battle WHERE bulgarian_commander  =  'Kaloyan' AND latin_commander  =  'Baldwin I'
Database: battle_death (tables: battle)
Question: How many different results are there for the battles?
SQL: SELECT count(DISTINCT RESULT) FROM battle
Database: battle_death (tables: battle, ship)
Question: How many battles did not lose any ship with tonnage '225'?
SQL: SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage  =  '225' );
Database: battle_death (tables: battle, ship)
Question: List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
SQL: SELECT T1.name ,  T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.name  =  'Lettice' INTERSECT SELECT T1.name ,  T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.name  =  'HMS Atalanta'
Database: battle_death (tables: battle, ship)
Question: Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.
SQL: SELECT name ,  RESULT ,  bulgarian_commander FROM battle EXCEPT SELECT T1.name ,  T1.result ,  T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.location  =  'English Channel'
Database: battle_death (tables: death)
Question: What are the notes of the death events which has substring 'East'?
SQL: SELECT note FROM death WHERE note LIKE '%East%'
Database: student_transcripts_tracking (tables: addresses)
Question: what are all the addresses including line 1 and line 2?
SQL: SELECT line_1 ,  line_2 FROM addresses
Database: student_transcripts_tracking (tables: addresses)
Question: What is the first and second line for all addresses?
SQL: SELECT line_1 ,  line_2 FROM addresses
Database: student_transcripts_tracking (tables: courses)
Question: How many courses in total are listed?
SQL: SELECT count(*) FROM Courses
Database: student_transcripts_tracking (tables: courses)
Question: How many courses are there?
SQL: SELECT count(*) FROM Courses
Database: student_transcripts_tracking (tables: courses)
Question: How is the math course described?
SQL: SELECT course_description FROM Courses WHERE course_name  =  'math'
Database: student_transcripts_tracking (tables: courses)
Question: What are the descriptions for all the math courses?
SQL: SELECT course_description FROM Courses WHERE course_name  =  'math'
Database: student_transcripts_tracking (tables: addresses)
Question: What is the zip code of the address in the city Port Chelsea?
SQL: SELECT zip_postcode FROM Addresses WHERE city  =  'Port Chelsea'
Database: student_transcripts_tracking (tables: addresses)
Question: What is the zip code for Port Chelsea?
SQL: SELECT zip_postcode FROM Addresses WHERE city  =  'Port Chelsea'
Database: student_transcripts_tracking (tables: degree_programs, departments)
Question: Which department offers the most number of degrees? List department name and id.
SQL: SELECT T2.department_name ,  T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id  =  T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1
Database: student_transcripts_tracking (tables: departments, degree_programs)
Question: What is the name and id of the department with the most number of degrees ?
SQL: select t2.department_name ,  t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id  =  t2.department_id group by t1.department_id order by count(*) desc limit 1
Database: student_transcripts_tracking (tables: degree_programs)
Question: How many departments offer any degree?
SQL: SELECT count(DISTINCT department_id) FROM Degree_Programs
Database: student_transcripts_tracking (tables: degree_programs)
Question: How many different departments offer degrees?
SQL: SELECT count(DISTINCT department_id) FROM Degree_Programs
Database: student_transcripts_tracking (tables: degree_programs)
Question: How many different degree names are offered?
SQL: SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs
Database: student_transcripts_tracking (tables: degree_programs)
Question: How many different degrees are offered?
SQL: SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs
Database: student_transcripts_tracking (tables: degree_programs, departments)
Question: How many degrees does the engineering department offer?
SQL: SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id  =  T2.department_id WHERE T1.department_name  =  'engineer'