minktn/spider-data huggingface dataset:
Database: match_season
Question: Show the season, the player, and the name of the country that player belongs to.
SQL: SELECT T2.Season ,  T2.Player ,  T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country
Database: match_season
Question: For each player, what are their name, season, and country that they belong to?
SQL: SELECT T2.Season ,  T2.Player ,  T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country
Database: match_season
Question: Which players are from Indonesia?
SQL: SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T1.Country_name  =  "Indonesia"
Database: match_season
Question: Who are the players from Indonesia?
SQL: SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T1.Country_name  =  "Indonesia"
Database: match_season
Question: What are the distinct positions of the players from a country whose capital is Dublin?
SQL: SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T1.Capital  =  "Dublin"
Database: match_season
Question: Give the different positions of players who play for the country with the capital Dublin.
SQL: SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T1.Capital  =  "Dublin"
Database: match_season
Question: What are the official languages of the countries of players from Maryland or Duke college?
SQL: SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.College  =  "Maryland" OR T2.College  =  "Duke"
Database: match_season
Question: Return the official native languages of countries who have players from Maryland or Duke colleges.
SQL: SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.College  =  "Maryland" OR T2.College  =  "Duke"
Database: match_season
Question: How many distinct official languages are there among countries of players whose positions are defenders.
SQL: SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Defender"
Database: match_season
Question: Count the number of different official languages corresponding to countries that players who play Defender are from.
SQL: SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Defender"
Database: match_season
Question: Show the season, the player, and the name of the team that players belong to.
SQL: SELECT T1.Season ,  T1.Player ,  T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id
Database: match_season
Question: Who are the different players, what season do they play in, and what is the name of the team they are on?
SQL: SELECT T1.Season ,  T1.Player ,  T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id
Database: match_season
Question: Show the positions of the players from the team with name "Ryley Goldner".
SQL: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Ryley Goldner"
Database: match_season
Question: Return the positions of players on the team Ryley Goldner.
SQL: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Ryley Goldner"
Database: match_season
Question: How many distinct colleges are associated with players from the team with name "Columbus Crew".
SQL: SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Columbus Crew"
Database: match_season
Question: Count the number of different colleges that players who play for Columbus Crew are from.
SQL: SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Columbus Crew"
Database: match_season
Question: Show the players and years played for players from team "Columbus Crew".
SQL: SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Columbus Crew"
Database: match_season
Question: What are the players who played for Columbus Crew, and how many years did each play for?
SQL: SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Columbus Crew"
Database: match_season
Question: Show the position of players and the corresponding number of players.
SQL: SELECT POSITION ,  COUNT(*) FROM match_season GROUP BY POSITION
Database: match_season
Question: How many players played each position?
SQL: SELECT POSITION ,  COUNT(*) FROM match_season GROUP BY POSITION
Database: match_season
Question: Show the country names and the corresponding number of players.
SQL: SELECT Country_name ,  COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country GROUP BY T1.Country_name
Database: match_season
Question: How many players are from each country?
SQL: SELECT Country_name ,  COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country GROUP BY T1.Country_name
Database: match_season
Question: Return all players sorted by college in ascending alphabetical order.
SQL: SELECT player FROM match_season ORDER BY College ASC
Database: match_season
Question: What are all the players who played in match season, sorted by college in ascending alphabetical order?
SQL: SELECT player FROM match_season ORDER BY College ASC
Database: match_season
Question: Show the most common position of players in match seasons.
SQL: SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1
Database: match_season
Question: What is the position that is most common among players in match seasons?
SQL: SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1
Database: match_season
Question: Show the top 3 most common colleges of players in match seasons.
SQL: SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3
Database: match_season
Question: What are the three colleges from which the most players are from?
SQL: SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3
Database: match_season
Question: Show the name of colleges that have at least two players.
SQL: SELECT College FROM match_season GROUP BY College HAVING count(*)  >=  2
Database: match_season
Question: What are the names of all colleges that have two or more players?
SQL: SELECT College FROM match_season GROUP BY College HAVING count(*)  >=  2
Database: match_season
Question: Show the name of colleges that have at least two players in descending alphabetical order.
SQL: SELECT College FROM match_season GROUP BY College HAVING count(*)  >=  2 ORDER BY College DESC
Database: match_season
Question: What are the names of colleges that have two or more players, listed in descending alphabetical order?
SQL: SELECT College FROM match_season GROUP BY College HAVING count(*)  >=  2 ORDER BY College DESC
Database: match_season
Question: What are the names of teams that do no have match season record?
SQL: SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)
Database: match_season
Question: Return the names of teams that have no match season record.
SQL: SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)
Database: match_season
Question: What are the names of countries that have both players with position forward and players with position defender?
SQL: SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Defender"
Database: match_season
Question: Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.
SQL: SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Defender"
Database: match_season
Question: Which college have both players with position midfielder and players with position defender?
SQL: SELECT College FROM match_season WHERE POSITION  =  "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION  =  "Defender"
Database: match_season
Question: Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.
SQL: SELECT College FROM match_season WHERE POSITION  =  "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION  =  "Defender"
Database: climbing
Question: How many climbers are there?
SQL: SELECT count(*) FROM climber
Database: climbing
Question: Count the number of climbers.
SQL: SELECT count(*) FROM climber
Database: climbing
Question: List the names of climbers in descending order of points.
SQL: SELECT Name FROM climber ORDER BY Points DESC
Database: climbing
Question: What are the names of the climbers, ordered by points descending?
SQL: SELECT Name FROM climber ORDER BY Points DESC
Database: climbing
Question: List the names of climbers whose country is not Switzerland.
SQL: SELECT Name FROM climber WHERE Country != "Switzerland"
Database: climbing
Question: What are the names of climbers who are not from the country of Switzerland?
SQL: SELECT Name FROM climber WHERE Country != "Switzerland"
Database: climbing
Question: What is the maximum point for climbers whose country is United Kingdom?
SQL: SELECT max(Points) FROM climber WHERE Country  =  "United Kingdom"
Database: climbing
Question: Return the maximum number of points for climbers from the United Kingdom.
SQL: SELECT max(Points) FROM climber WHERE Country  =  "United Kingdom"
Database: climbing
Question: How many distinct countries are the climbers from?
SQL: SELECT COUNT(DISTINCT Country) FROM climber
Database: climbing
Question: Count the number of different countries that climbers are from.
SQL: SELECT COUNT(DISTINCT Country) FROM climber
Database: climbing
Question: What are the names of mountains in ascending alphabetical order?
SQL: SELECT Name FROM mountain ORDER BY Name ASC
Database: climbing
Question: Give the names of mountains in alphabetical order.
SQL: SELECT Name FROM mountain ORDER BY Name ASC
Database: climbing
Question: What are the countries of mountains with height bigger than 5000?
SQL: SELECT Country FROM mountain WHERE Height  >  5000
Database: climbing
Question: Return the countries of the mountains that have a height larger than 5000.
SQL: SELECT Country FROM mountain WHERE Height  >  5000
Database: climbing
Question: What is the name of the highest mountain?
SQL: SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1
Database: climbing
Question: Return the name of the mountain with the greatest height.
SQL: SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1
Database: climbing
Question: List the distinct ranges of the mountains with the top 3 prominence.
SQL: SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3
Database: climbing
Question: What are the different ranges of the 3 mountains with the highest prominence?
SQL: SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3
Database: climbing
Question: Show names of climbers and the names of mountains they climb.
SQL: SELECT T1.Name ,  T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID
Database: climbing
Question: What are the names of climbers and the corresponding names of mountains that they climb?
SQL: SELECT T1.Name ,  T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID
Database: climbing
Question: Show the names of climbers and the heights of mountains they climb.
SQL: SELECT T1.Name ,  T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID
Database: climbing
Question: What are the names of climbers and the corresponding heights of the mountains that they climb?
SQL: SELECT T1.Name ,  T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID
Database: climbing
Question: Show the height of the mountain climbed by the climber with the maximum points.
SQL: SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1
Database: climbing
Question: What is the height of the mountain climbined by the climbing who had the most points?
SQL: SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1
Database: climbing
Question: Show the distinct names of mountains climbed by climbers from country "West Germany".
SQL: SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID WHERE T1.Country  =  "West Germany"
Database: climbing
Question: What are the different names of mountains ascended by climbers from the country of West Germany?
SQL: SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID WHERE T1.Country  =  "West Germany"
Database: climbing
Question: Show the times used by climbers to climb mountains in Country Uganda.
SQL: SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID WHERE T2.Country  =  "Uganda"
Database: climbing
Question: What are the times used by climbers who climbed mountains in the country of Uganda?
SQL: SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID WHERE T2.Country  =  "Uganda"
Database: climbing
Question: Please show the countries and the number of climbers from each country.
SQL: SELECT Country ,  COUNT(*) FROM climber GROUP BY Country
Database: climbing
Question: How many climbers are from each country?
SQL: SELECT Country ,  COUNT(*) FROM climber GROUP BY Country
Database: climbing
Question: List the countries that have more than one mountain.
SQL: SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*)  >  1
Database: climbing
Question: Which countries have more than one mountain?
SQL: SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*)  >  1
Database: climbing
Question: List the names of mountains that do not have any climber.
SQL: SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)
Database: climbing
Question: What are the names of countains that no climber has climbed?
SQL: SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)
Database: climbing
Question: Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.
SQL: SELECT Country FROM mountain WHERE Height  >  5600 INTERSECT SELECT Country FROM mountain WHERE Height  <  5200
Database: climbing
Question: What are the countries that have both mountains that are higher than 5600 and lower than 5200?
SQL: SELECT Country FROM mountain WHERE Height  >  5600 INTERSECT SELECT Country FROM mountain WHERE Height  <  5200
Database: climbing
Question: Show the range that has the most number of mountains.
SQL: SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1
Database: climbing
Question: Which range contains the most mountains?
SQL: SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1
Database: climbing
Question: Show the names of mountains with height more than 5000 or prominence more than 1000.
SQL: SELECT Name FROM mountain WHERE Height  >  5000 OR Prominence  >  1000
Database: climbing
Question: What are the names of mountains that have a height of over 5000 or a prominence of over 1000?
SQL: SELECT Name FROM mountain WHERE Height  >  5000 OR Prominence  >  1000
Database: body_builder
Question: How many body builders are there?
SQL: SELECT count(*) FROM body_builder
Database: body_builder
Question: List the total scores of body builders in ascending order.
SQL: SELECT Total FROM body_builder ORDER BY Total ASC
Database: body_builder
Question: List the snatch score and clean jerk score of body builders in ascending order of snatch score.
SQL: SELECT Snatch ,  Clean_Jerk FROM body_builder ORDER BY Snatch ASC
Database: body_builder
Question: What is the average snatch score of body builders?
SQL: SELECT avg(Snatch) FROM body_builder
Database: body_builder
Question: What are the clean and jerk score of the body builder with the highest total score?
SQL: SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1
Database: body_builder
Question: What are the birthdays of people in ascending order of height?
SQL: SELECT Birth_Date FROM People ORDER BY Height ASC
Database: body_builder
Question: What are the names of body builders?
SQL: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
Database: body_builder
Question: What are the names of body builders whose total score is higher than 300?
SQL: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Total  >  300
Database: body_builder
Question: What is the name of the body builder with the greatest body weight?
SQL: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Weight DESC LIMIT 1
Database: body_builder
Question: What are the birth date and birth place of the body builder with the highest total points?
SQL: SELECT T2.Birth_Date ,  T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Total DESC LIMIT 1
Database: body_builder
Question: What are the heights of body builders with total score smaller than 315?
SQL: SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Total  <  315
Database: body_builder
Question: What is the average total score of body builders with height bigger than 200?
SQL: SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Height  >  200
Database: body_builder
Question: What are the names of body builders in descending order of total scores?
SQL: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Total DESC
Database: body_builder
Question: List each birth place along with the number of people from there.
SQL: SELECT Birth_Place ,  COUNT(*) FROM people GROUP BY Birth_Place
Database: body_builder
Question: What is the most common birth place of people?
SQL: SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1
Database: body_builder
Question: What are the birth places that are shared by at least two people?
SQL: SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*)  >=  2
Database: body_builder
Question: List the height and weight of people in descending order of height.
SQL: SELECT Height ,  Weight FROM people ORDER BY Height DESC
Database: body_builder
Question: Show all information about each body builder.
SQL: SELECT * FROM body_builder
Database: body_builder
Question: List the names and origins of people who are not body builders.
SQL: SELECT Name ,  birth_place FROM people EXCEPT SELECT T1.Name ,  T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id  =  T2.people_id
Database: body_builder
Question: How many distinct birth places are there?
SQL: SELECT count(DISTINCT Birth_Place) FROM people
Database: body_builder
Question: How many persons are not body builders?
SQL: SELECT count(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder)
Database: body_builder
Question: What is the minimum snatch score?
SQL: SELECT min(snatch) FROM body_builder
Database: election_representative
Question: How many elections are there?
SQL: SELECT count(*) FROM election
Database: election_representative
Question: List the votes of elections in descending order.
SQL: SELECT Votes FROM election ORDER BY Votes DESC
Database: election_representative
Question: List the dates and vote percents of elections.
SQL: SELECT Date ,  Vote_Percent FROM election
Database: election_representative
Question: What are the minimum and maximum vote percents of elections?
SQL: SELECT min(Vote_Percent) ,  max(Vote_Percent) FROM election
Database: election_representative
Question: What are the names and parties of representatives?
SQL: SELECT Name ,  Party FROM representative
Database: election_representative
Question: What are the names of representatives whose party is not "Republican"?
SQL: SELECT Name FROM Representative WHERE Party != "Republican"
Database: election_representative
Question: What are the life spans of representatives from New York state or Indiana state?
SQL: SELECT Lifespan FROM representative WHERE State  =  "New York" OR State  =  "Indiana"
Database: election_representative
Question: What are the names of representatives and the dates of elections they participated in.
SQL: SELECT T2.Name ,  T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID
Database: election_representative
Question: What are the names of representatives with more than 10000 votes in election?
SQL: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID WHERE Votes  >  10000
Database: election_representative
Question: What are the names of representatives in descending order of votes?
SQL: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY votes DESC
Database: election_representative
Question: What is the party of the representative that has the smallest number of votes.
SQL: SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY votes ASC LIMIT 1
Database: election_representative
Question: What are the lifespans of representatives in descending order of vote percent?
SQL: SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY Vote_Percent DESC
Database: election_representative
Question: What is the average number of votes of representatives from party "Republican"?
SQL: SELECT avg(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID WHERE T2.Party  =  "Republican"
Database: election_representative
Question: What are the different parties of representative? Show the party name and the number of representatives in each party.
SQL: SELECT Party ,  COUNT(*) FROM representative GROUP BY Party
Database: election_representative
Question: What is the party that has the largest number of representatives?
SQL: SELECT Party ,  COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1
Database: election_representative
Question: What parties have at least three representatives?
SQL: SELECT Party FROM representative GROUP BY Party HAVING COUNT(*)  >=  3
Database: election_representative
Question: What states have at least two representatives?
SQL: SELECT State FROM representative GROUP BY State HAVING COUNT(*)  >=  2
Database: election_representative
Question: List the names of representatives that have not participated in elections listed here.
SQL: SELECT Name FROM representative WHERE Representative_ID NOT IN (SELECT Representative_ID FROM election)
Database: election_representative
Question: Show the parties that have both representatives in New York state and representatives in Pennsylvania state.
SQL: SELECT Party FROM representative WHERE State  =  "New York" INTERSECT SELECT Party FROM representative WHERE State  =  "Pennsylvania"
Database: election_representative
Question: How many distinct parties are there for representatives?
SQL: SELECT count(DISTINCT Party) FROM representative
Database: apartment_rentals
Question: How many apartment bookings are there in total?
SQL: SELECT count(*) FROM Apartment_Bookings
Database: apartment_rentals
Question: Count the total number of apartment bookings.
SQL: SELECT count(*) FROM Apartment_Bookings
Database: apartment_rentals
Question: Show the start dates and end dates of all the apartment bookings.
SQL: SELECT booking_start_date ,  booking_end_date FROM Apartment_Bookings
Database: apartment_rentals
Question: What are the start date and end date of each apartment booking?
SQL: SELECT booking_start_date ,  booking_end_date FROM Apartment_Bookings
Database: apartment_rentals
Question: Show all distinct building descriptions.
SQL: SELECT DISTINCT building_description FROM Apartment_Buildings
Database: apartment_rentals
Question: Give me a list of all the distinct building descriptions.
SQL: SELECT DISTINCT building_description FROM Apartment_Buildings
Database: apartment_rentals
Question: Show the short names of the buildings managed by "Emma".
SQL: SELECT building_short_name FROM Apartment_Buildings WHERE building_manager	 =  "Emma"
Database: apartment_rentals
Question: Which buildings does "Emma" manage? Give me the short names of the buildings.
SQL: SELECT building_short_name FROM Apartment_Buildings WHERE building_manager	 =  "Emma"
Database: apartment_rentals
Question: Show the addresses and phones of all the buildings managed by "Brenden".
SQL: SELECT building_address ,  building_phone FROM Apartment_Buildings WHERE building_manager	 =  "Brenden"
Database: apartment_rentals
Question: What are the address and phone number of the buildings managed by "Brenden"?
SQL: SELECT building_address ,  building_phone FROM Apartment_Buildings WHERE building_manager	 =  "Brenden"
Database: apartment_rentals
Question: What are the building full names that contain the word "court"?
SQL: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%"
Database: apartment_rentals
Question: Find all the building full names containing the word "court".
SQL: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%"
Database: apartment_rentals
Question: What is the minimum and maximum number of bathrooms of all the apartments?
SQL: SELECT min(bathroom_count) ,  max(bathroom_count) FROM Apartments
Database: apartment_rentals
Question: Give me the minimum and maximum bathroom count among all the apartments.
SQL: SELECT min(bathroom_count) ,  max(bathroom_count) FROM Apartments
Database: apartment_rentals
Question: What is the average number of bedrooms of all apartments?
SQL: SELECT avg(bedroom_count) FROM Apartments
Database: apartment_rentals
Question: Find the average number of bedrooms of all the apartments.
SQL: SELECT avg(bedroom_count) FROM Apartments
Database: apartment_rentals
Question: Return the apartment number and the number of rooms for each apartment.
SQL: SELECT apt_number ,  room_count FROM Apartments
Database: apartment_rentals
Question: What are the apartment number and the room count of each apartment?
SQL: SELECT apt_number ,  room_count FROM Apartments
Database: apartment_rentals
Question: What is the average number of rooms of apartments with type code "Studio"?
SQL: SELECT avg(room_count) FROM Apartments WHERE apt_type_code  =  "Studio"
Database: apartment_rentals
Question: Find the average room count of the apartments that have the "Studio" type code.
SQL: SELECT avg(room_count) FROM Apartments WHERE apt_type_code  =  "Studio"
Database: apartment_rentals
Question: Return the apartment numbers of the apartments with type code "Flat".
SQL: SELECT apt_number FROM Apartments WHERE apt_type_code  =  "Flat"
Database: apartment_rentals
Question: Which apartments have type code "Flat"? Give me their apartment numbers.
SQL: SELECT apt_number FROM Apartments WHERE apt_type_code  =  "Flat"
Database: apartment_rentals
Question: Return the first names and last names of all guests
SQL: SELECT guest_first_name ,  guest_last_name FROM Guests
Database: apartment_rentals
Question: What are the first names and last names of all the guests?
SQL: SELECT guest_first_name ,  guest_last_name FROM Guests
Database: apartment_rentals
Question: Return the date of birth for all the guests with gender code "Male".
SQL: SELECT date_of_birth FROM Guests WHERE gender_code  =  "Male"
Database: apartment_rentals
Question: What are dates of birth of all the guests whose gender is "Male"?
SQL: SELECT date_of_birth FROM Guests WHERE gender_code  =  "Male"
Database: apartment_rentals
Question: Show the apartment numbers, start dates, and end dates of all the apartment bookings.
SQL: SELECT T2.apt_number ,  T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id
Database: apartment_rentals
Question: What are the apartment number, start date, and end date of each apartment booking?
SQL: SELECT T2.apt_number ,  T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id
Database: apartment_rentals
Question: What are the booking start and end dates of the apartments with type code "Duplex"?
SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.apt_type_code  =  "Duplex"
Database: apartment_rentals
Question: Return the booking start date and end date for the apartments that have type code "Duplex".
SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.apt_type_code  =  "Duplex"
Database: apartment_rentals
Question: What are the booking start and end dates of the apartments with more than 2 bedrooms?
SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  2
Database: apartment_rentals
Question: Find the booking start date and end date for the apartments that have more than two bedrooms.
SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  2
Database: apartment_rentals
Question: What is the booking status code of the apartment with apartment number "Suite 634"?
SQL: SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.apt_number  =  "Suite 634"
Database: apartment_rentals
Question: Tell me the booking status code for the apartment with number "Suite 634".
SQL: SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.apt_number  =  "Suite 634"
Database: apartment_rentals
Question: Show the distinct apartment numbers of the apartments that have bookings with status code "Confirmed".
SQL: SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Confirmed"
Database: apartment_rentals
Question: Which apartments have bookings with status code "Confirmed"? Return their apartment numbers.
SQL: SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Confirmed"
Database: apartment_rentals
Question: Show the average room count of the apartments that have booking status code "Provisional".
SQL: SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Provisional"
Database: apartment_rentals
Question: What is the average room count of the apartments whose booking status code is "Provisional"?
SQL: SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Provisional"
Database: apartment_rentals
Question: Show the guest first names, start dates, and end dates of all the apartment bookings.
SQL: SELECT T2.guest_first_name ,  T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id
Database: apartment_rentals
Question: What are the guest first name, start date, and end date of each apartment booking?
SQL: SELECT T2.guest_first_name ,  T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id
Database: apartment_rentals
Question: Show the start dates and end dates of all the apartment bookings made by guests with gender code "Female".
SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T2.gender_code  =  "Female"
Database: apartment_rentals
Question: What are the start date and end date of the apartment bookings made by female guests (gender code "Female")?
SQL: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T2.gender_code  =  "Female"
Database: apartment_rentals
Question: Show the first names and last names of all the guests that have apartment bookings with status code "Confirmed".
SQL: SELECT T2.guest_first_name ,  T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T1.booking_status_code  =  "Confirmed"
Database: apartment_rentals
Question: Which guests have apartment bookings with status code "Confirmed"? Return their first names and last names.
SQL: SELECT T2.guest_first_name ,  T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T1.booking_status_code  =  "Confirmed"
Database: apartment_rentals
Question: Show the facility codes of apartments with more than 4 bedrooms.
SQL: SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  4
Database: apartment_rentals
Question: What are the facility codes of the apartments with more than four bedrooms?
SQL: SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  4
Database: apartment_rentals
Question: Show the total number of rooms of all apartments with facility code "Gym".
SQL: SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.facility_code  =  "Gym"
Database: apartment_rentals
Question: Find the total number of rooms in the apartments that have facility code "Gym".
SQL: SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.facility_code  =  "Gym"
Database: apartment_rentals
Question: Show the total number of rooms of the apartments in the building with short name "Columbus Square".
SQL: SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_short_name  =  "Columbus Square"
Database: apartment_rentals
Question: How many rooms in total are there in the apartments in the building with short name "Columbus Square"?
SQL: SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_short_name  =  "Columbus Square"
Database: apartment_rentals
Question: Show the addresses of the buildings that have apartments with more than 2 bathrooms.
SQL: SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T2.bathroom_count  >  2
Database: apartment_rentals
Question: Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.
SQL: SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T2.bathroom_count  >  2
Database: apartment_rentals
Question: Show the apartment type codes and apartment numbers in the buildings managed by "Kyle".
SQL: SELECT T2.apt_type_code ,  T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_manager  =  "Kyle"
Database: apartment_rentals
Question: What apartment type codes and apartment numbers do the buildings managed by "Kyle" have?
SQL: SELECT T2.apt_type_code ,  T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_manager  =  "Kyle"
Database: apartment_rentals
Question: Show the booking status code and the corresponding number of bookings.
SQL: SELECT 	booking_status_code ,  COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
Database: apartment_rentals
Question: How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.
SQL: SELECT 	booking_status_code ,  COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
Database: apartment_rentals
Question: Return all the apartment numbers sorted by the room count in ascending order.
SQL: SELECT apt_number FROM Apartments ORDER BY room_count ASC
Database: apartment_rentals
Question: Sort the apartment numbers in ascending order of room count.
SQL: SELECT apt_number FROM Apartments ORDER BY room_count ASC
Database: apartment_rentals
Question: Return the apartment number with the largest number of bedrooms.
SQL: SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1
Database: apartment_rentals
Question: What is the apartment number of the apartment with the most beds?
SQL: SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1
Database: apartment_rentals
Question: Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.
SQL: SELECT apt_type_code ,  COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC
Database: apartment_rentals
Question: Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments.
SQL: SELECT apt_type_code ,  COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC
Database: apartment_rentals
Question: Show the top 3 apartment type codes sorted by the average number of rooms in descending order.
SQL: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3
Database: apartment_rentals
Question: What are the top three apartment types in terms of the average room count? Give me the
SQL: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3
Database: apartment_rentals
Question: Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms.
SQL: SELECT apt_type_code ,  bathroom_count ,  bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1
Database: apartment_rentals
Question: Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.
SQL: SELECT apt_type_code ,  bathroom_count ,  bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1
Database: apartment_rentals
Question: Show the most common apartment type code.
SQL: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
Database: apartment_rentals
Question: Which apartment type code appears the most often?
SQL: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
Database: apartment_rentals
Question: Show the most common apartment type code among apartments with more than 1 bathroom.
SQL: SELECT apt_type_code FROM Apartments WHERE bathroom_count  >  1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
Database: apartment_rentals
Question: Which apartment type code is the most common among apartments with more than one bathroom?
SQL: SELECT apt_type_code FROM Apartments WHERE bathroom_count  >  1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
Database: apartment_rentals
Question: Show each apartment type code, and the maximum and minimum number of rooms for each type.
SQL: SELECT apt_type_code ,  max(room_count) ,  min(room_count) FROM Apartments GROUP BY apt_type_code
Database: apartment_rentals
Question: Return each apartment type code along with the maximum and minimum number of rooms among each type.
SQL: SELECT apt_type_code ,  max(room_count) ,  min(room_count) FROM Apartments GROUP BY apt_type_code
Database: apartment_rentals
Question: Show each gender code and the corresponding count of guests sorted by the count in descending order.
SQL: SELECT gender_code ,  COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC
Database: apartment_rentals
Question: Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.
SQL: SELECT gender_code ,  COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC
Database: apartment_rentals
Question: How many apartments do not have any facility?
SQL: SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
Database: apartment_rentals
Question: Find the number of apartments that have no facility.
SQL: SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
Database: apartment_rentals
Question: Show the apartment numbers of apartments with bookings that have status code both "Provisional" and "Confirmed"
SQL: SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Confirmed" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Provisional"
Database: apartment_rentals
Question: Which apartments have bookings with both status codes "Provisional" and "Confirmed"? Give me the apartment numbers.
SQL: SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Confirmed" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Provisional"
Database: apartment_rentals
Question: Show the apartment numbers of apartments with unit status availability of both 0 and 1.
SQL: SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  1
Database: apartment_rentals
Question: Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.
SQL: SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  1
Database: game_injury
Question: How many games are held after season 2007?
SQL: SELECT count(*) FROM game WHERE season  >  2007
Database: game_injury
Question: List the dates of games by the home team name in descending order.
SQL: SELECT Date FROM game ORDER BY home_team DESC
Database: game_injury
Question: List the season, home team, away team of all the games.
SQL: SELECT season ,  home_team ,  away_team FROM game
Database: game_injury
Question: What are the maximum, minimum and average home games each stadium held?
SQL: SELECT max(home_games) ,  min(home_games) ,  avg(home_games) FROM stadium
Database: game_injury
Question: What is the average attendance of stadiums with capacity percentage higher than 100%?
SQL: SELECT average_attendance FROM stadium WHERE capacity_percentage  >  100
Database: game_injury
Question: What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?
SQL: SELECT player ,  number_of_matches ,  SOURCE FROM injury_accident WHERE injury != 'Knee problem'
Database: game_injury
Question: What is the season of the game which causes the player 'Walter Samuel' to get injured?
SQL: SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id  =  T2.game_id WHERE T2.player  =  'Walter Samuel'
Database: game_injury
Question: What are the ids, scores, and dates of the games which caused at least two injury accidents?
SQL: SELECT T1.id ,  T1.score ,  T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id  =  T1.id GROUP BY T1.id HAVING count(*)  >=  2
Database: game_injury
Question: What are the id and name of the stadium where the most injury accidents happened?
SQL: SELECT T1.id ,  T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id  =  T2.stadium_id JOIN injury_accident AS T3 ON T2.id  =  T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
Database: game_injury
Question: Find the id and name of the stadium where the largest number of injury accidents occurred.
SQL: SELECT T1.id ,  T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id  =  T2.stadium_id JOIN injury_accident AS T3 ON T2.id  =  T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
Database: game_injury
Question: In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?
SQL: SELECT T1.season ,  T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id WHERE T3.injury  =  'Foot injury' OR T3.injury  =  'Knee problem'
Database: game_injury
Question: How many different kinds of information sources are there for injury accidents?
SQL: SELECT count(DISTINCT SOURCE) FROM injury_accident
Database: game_injury
Question: How many games are free of injury accidents?
SQL: SELECT count(*) FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident )
Database: game_injury
Question: How many distinct kinds of injuries happened after season 2010?
SQL: SELECT count(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id  =  T2.id WHERE T2.season  >  2010
Database: game_injury
Question: List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.
SQL: SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id WHERE T3.player  =  'Walter Samuel' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id WHERE T3.player  =  'Thiago Motta'
Database: game_injury
Question: Show the name, average attendance, total attendance for stadiums where no accidents happened.
SQL: SELECT name ,  average_attendance ,  total_attendance FROM stadium EXCEPT SELECT T2.name ,  T2.average_attendance ,  T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id
Database: game_injury
Question: Which stadium name contains the substring "Bank"?
SQL: SELECT name FROM stadium WHERE name LIKE "%Bank%"
Database: game_injury
Question: How many games has each stadium held?
SQL: SELECT T1.id ,  count(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id  =  T2.stadium_id GROUP BY T1.id
Database: game_injury
Question: For each injury accident, find the date of the game and the name of the injured player in the game, and sort the results in descending order of game season.
SQL: SELECT T1.date ,  T2.player FROM game AS T1 JOIN injury_accident AS T2 ON T1.id  =  T2.game_id ORDER BY T1.season DESC
Database: soccer_1
Question: List all country and league names.
SQL: SELECT T1.name ,  T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id  =  T2.country_id
Database: soccer_1
Question: How many leagues are there in England?
SQL: SELECT count(*) FROM Country AS T1 JOIN League AS T2 ON T1.id  =  T2.country_id WHERE T1.name  =  "England"
Database: soccer_1
Question: What is the average weight of all players?
SQL: SELECT avg(weight) FROM Player
Database: soccer_1
Question: What is the maximum and minimum height of all players?
SQL: SELECT max(weight) ,  min(weight) FROM Player
Database: soccer_1
Question: List all player names who have an overall rating higher than the average.
SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating  >  ( SELECT avg(overall_rating) FROM Player_Attributes )