aherntech/sparc huggingface dataset:
Database: bike_1
Question sequence:
Which station ids ever had bike availability below 7?
Which did not?
Force those stations to additionally have latitude above 37.4.
SQL query sequence:
SELECT DISTINCT station_id FROM status GROUP BY station_id HAVING min(bikes_available)  <  7
SELECT id FROM station EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available)  <  7
SELECT id FROM station WHERE lat  >  37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available)  <  7
Final question: What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?
Final SQL: SELECT id FROM station WHERE lat  >  37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available)  <  7
Database: bike_1
Question sequence:
Which stations are located in San Jose?
What are names of stations that have average bike availability above 10 and are not located in San Jose city?
SQL query sequence:
SELECT name FROM station WHERE city  =  "San Jose"
SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available)  >  10 EXCEPT SELECT name FROM station WHERE city  =  "San Jose"
Final question: What are names of stations that have average bike availability above 10 and are not located in San Jose city?
Final SQL: SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available)  >  10 EXCEPT SELECT name FROM station WHERE city  =  "San Jose"
Database: bike_1
Question sequence:
Give name, latitude, and city from stations.
Order that by latitude ascending.
Just limit it to the lowest latitude.
SQL query sequence:
SELECT name ,  lat ,  city FROM station
SELECT name ,  lat ,  city FROM station ORDER BY lat
SELECT name ,  lat ,  city FROM station ORDER BY lat LIMIT 1
Final question: What are the name, latitude, and city of the station with the lowest latitude?
Final SQL: SELECT name ,  lat ,  city FROM station ORDER BY lat LIMIT 1
Database: bike_1
Question sequence:
Which dates had the largest max gust speed?
Also give mean temperature and mean humidity.
Give the top 3 days instead.
SQL query sequence:
SELECT date FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 1
SELECT date ,  mean_temperature_f ,  mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 1
SELECT date ,  mean_temperature_f ,  mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3
Final question: What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?
Final SQL: SELECT date ,  mean_temperature_f ,  mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3
Database: bike_1
Question sequence:
Which city has the most stations?
List the name and the number of stations for all the cities that have at least 15 stations.
SQL query sequence:
SELECT city FROM station GROUP BY city ORDER By count(*) DESC limit 1
SELECT city ,  COUNT(*) FROM station GROUP BY city HAVING COUNT(*)  >=  15
Final question: List the name and the number of stations for all the cities that have at least 15 stations.
Final SQL: SELECT city ,  COUNT(*) FROM station GROUP BY city HAVING COUNT(*)  >=  15
Database: bike_1
Question sequence:
Give the ids of start stations together with the count of trips originated there.
Show the id and name for those with count at least 200.
SQL query sequence:
SELECT start_station_id, count(*) from trip GROUP by start_station_id
SELECT start_station_id ,  start_station_name FROM trip GROUP BY start_station_id HAVING COUNT(*)  >=  200
Final question: Find the ids and names of stations from which at least 200 trips started.
Final SQL: SELECT start_station_id ,  start_station_name FROM trip GROUP BY start_station_id HAVING COUNT(*)  >=  200
Database: bike_1
Question sequence:
Show the zip codes and average mean visibilities.
Find the zip code in which the average mean visibility is lower than 10.
SQL query sequence:
SELECT zip_code, mean_visibility_miles from weather
SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles)  <  10
Final question: Find the zip code in which the average mean visibility is lower than 10.
Final SQL: SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles)  <  10
Database: bike_1
Question sequence:
What is the highest latitude of any station?
Show that for each city
List all the cities in a decreasing order of each city's stations' highest latitude.
SQL query sequence:
SELECT max(lat) from station
SELECT city, max(lat) from station group by city
SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC
Final question: List all the cities in a decreasing order of each city's stations' highest latitude.
Final SQL: SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC
Database: bike_1
Question sequence:
Show dates ordered by descending cloud cover rate.
Also show me the cloud cover rate.
Only the top 5.
SQL query sequence:
SELECT date FROM weather ORDER BY cloud_cover
SELECT date ,  cloud_cover FROM weather ORDER BY cloud_cover
SELECT date ,  cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5
Final question: What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.
Final SQL: SELECT date ,  cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5
Database: bike_1
Question sequence:
Show trip durations.
What are the ids and durations of the trips with the top 3 durations?
SQL query sequence:
SELECT duration FROM trip
SELECT id ,  duration FROM trip ORDER BY duration DESC LIMIT 3
Final question: What are the ids and durations of the trips with the top 3 durations?
Final SQL: SELECT id ,  duration FROM trip ORDER BY duration DESC LIMIT 3
Database: bike_1
Question sequence:
Show the average duration of trips starting from each station id.
For each station, return its longitude and the average duration of trips that started from the station.
SQL query sequence:
SELECT start_station_id, avg(duration) from trip group by start_station_id
SELECT T1.name ,  T1.long ,  avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id  =  T2.start_station_id GROUP BY T2.start_station_id
Final question: For each station, return its longitude and the average duration of trips that started from the station.
Final SQL: SELECT T1.name ,  T1.long ,  avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id  =  T2.start_station_id GROUP BY T2.start_station_id
Database: bike_1
Question sequence:
Show the average duration of trips ending at each station id.
For each station, find its latitude and the minimum duration of trips that ended at the station.
SQL query sequence:
SELECT end_station_id, avg(duration) from trip group by end_station_id
SELECT T1.name ,  T1.lat ,  min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id  =  T2.end_station_id GROUP BY T2.end_station_id
Final question: For each station, find its latitude and the minimum duration of trips that ended at the station.
Final SQL: SELECT T1.name ,  T1.lat ,  min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id  =  T2.end_station_id GROUP BY T2.end_station_id
Database: bike_1
Question sequence:
Which zip codes ever had a max dew point reaching 70?
Which did not?
SQL query sequence:
SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f  >=  70
SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f  >=  70
Final question: Find all the zip codes in which the max dew point have never reached 70.
Final SQL: SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f  >=  70
Database: bike_1
Question sequence:
What was the average duration of trips in zip code 94103?
Which ids of trips lasted at least that long?
SQL query sequence:
SELECT avg(duration) FROM trip WHERE zip_code  =  94103
SELECT id FROM trip WHERE duration  >=  (SELECT avg(duration) FROM trip WHERE zip_code  =  94103)
Final question: Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103.
Final SQL: SELECT id FROM trip WHERE duration  >=  (SELECT avg(duration) FROM trip WHERE zip_code  =  94103)
Database: bike_1
Question sequence:
Show the min temperature and max temperature for each day.
Order that by ascending order of difference between the max and min temperatures.
Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.
SQL query sequence:
SELECT date, max_temperature_f, min_temperature_f from weather
SELECT date, max_temperature_f, min_temperature_f from weather ORDER by max_temperature_f - min_temperature_f
SELECT date ,  max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1
Final question: Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.
Final SQL: SELECT date ,  max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1
Database: bike_1
Question sequence:
Which station ids never had more than 12 bikes available?
Which ones ever had more than 12 bikes available?
What are the id and name of the stations that have ever had more than 12 bikes available?
SQL query sequence:
SELECT DISTINCT station_id from status where station_id not in (SELECT station_id from status where bikes_available > 12)
SELECT DISTINCT station_id from status where bikes_available > 12
SELECT DISTINCT T1.id ,  T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id WHERE T2.bikes_available  >  12
Final question: What are the id and name of the stations that have ever had more than 12 bikes available?
Final SQL: SELECT DISTINCT T1.id ,  T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id WHERE T2.bikes_available  >  12
Database: bike_1
Question sequence:
Which zip code had at least 100 trips taking place there?
Give me the zip code where the average mean humidity is below 70
Intersect those.
SQL query sequence:
SELECT DISTINCT zip_code FROM trip GROUP BY zip_code HAVING count(*)  >=  100
SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_humidity)  <  70
SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_humidity)  <  70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING count(*)  >=  100
Final question: Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place.
Final SQL: SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_humidity)  <  70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING count(*)  >=  100
Database: bike_1
Question sequence:
Which end station names have more than 100 trips ending there?
Which station names are in city "Palo Alto"?
Take set minus on the last two results: what are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times?
SQL query sequence:
SELECT DISTINCT end_station_name FROM trip GROUP BY end_station_name HAVING count(*)  >  100
SELECT name FROM station WHERE city  =  "Palo Alto"
SELECT name FROM station WHERE city  =  "Palo Alto" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*)  >  100
Final question: What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times?
Final SQL: SELECT name FROM station WHERE city  =  "Palo Alto" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*)  >  100
Database: bike_1
Question sequence:
How many trips started from Mountain View city
How many trips started from Mountain View city and ended at Palo Alto city?
SQL query sequence:
SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id  =  T2.start_station_id AND T2.id  =  T4.id AND T3.id  =  T4.end_station_id WHERE T1.city  =  "Mountain View"
SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id  =  T2.start_station_id AND T2.id  =  T4.id AND T3.id  =  T4.end_station_id WHERE T1.city  =  "Mountain View" AND T3.city  =  "Palo Alto"
Final question: How many trips started from Mountain View city and ended at Palo Alto city?
Final SQL: SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id  =  T2.start_station_id AND T2.id  =  T4.id AND T3.id  =  T4.end_station_id WHERE T1.city  =  "Mountain View" AND T3.city  =  "Palo Alto"
Database: riding_club
Question sequence:
Show all the information about the players.
How many are there?
SQL query sequence:
SELECT * FROM player
SELECT count(*) FROM player
Final question: How many players are there?
Final SQL: SELECT count(*) FROM player
Database: riding_club
Question sequence:
What are the player names?
How many vote does each player has?
Who has the maximum vote?
Order the names by number of vote in ascending order.
SQL query sequence:
SELECT Player_name FROM player
SELECT Player_name,Votes FROM player
SELECT Player_name FROM player ORDER BY Votes DESC limit 1
SELECT Player_name FROM player ORDER BY Votes ASC
Final question: List the names of players in ascending order of votes.
Final SQL: SELECT Player_name FROM player ORDER BY Votes ASC
Database: riding_club
Question sequence:
Show the player names and the residences.
Show the names and the occupation of each them.
SQL query sequence:
SELECT Player_name ,  residence FROM player
SELECT Gender ,  Occupation FROM player
Final question: What are the gender and occupation of players?
Final SQL: SELECT Gender ,  Occupation FROM player
Database: riding_club
Question sequence:
Show the player names and the residences.
Only keep those whose gender is male.
Show the player names and the residences whose occupation is not "Researcher".
SQL query sequence:
SELECT Player_name ,  residence FROM player
SELECT Player_name ,  residence FROM player WHERE Gender = "M"
SELECT Player_name ,  residence FROM player WHERE Occupation != "Researcher"
Final question: List the name and residence for players whose occupation is not "Researcher".
Final SQL: SELECT Player_name ,  residence FROM player WHERE Occupation != "Researcher"
Database: riding_club
Question sequence:
List the name and the sponsor name of each player.
How many unique sponsor names are there?
Which sponsor names support female players?
What about supporting players whose residence is "Brandon" or "Birtle"?
SQL query sequence:
SELECT Player_name, Sponsor_name FROM player
SELECT count(DISTINCT Sponsor_name) FROM player
SELECT Sponsor_name FROM player WHERE Gender  =  "F"
SELECT Sponsor_name FROM player WHERE Residence  =  "Brandon" OR Residence  =  "Birtle"
Final question: Show the names of sponsors of players whose residence is either "Brandon" or "Birtle".
Final SQL: SELECT Sponsor_name FROM player WHERE Residence  =  "Brandon" OR Residence  =  "Birtle"
Database: riding_club
Question sequence:
What are the player names and their number of votes?
Which one has the minimum vote?
What about the one with the maximum vote?
SQL query sequence:
SELECT Player_name, Votes FROM player
SELECT Player_name FROM player ORDER BY Votes ASC LIMIT 1
SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1
Final question: What is the name of the player with the largest number of votes?
Final SQL: SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1
Database: riding_club
Question sequence:
Show the unique occupation for the players?
How many in total?
How many are there in each occupation?
SQL query sequence:
SELECT distinct Occupation FROM player
SELECT count(distinct Occupation) FROM player
SELECT Occupation ,  COUNT(*) FROM player GROUP BY Occupation
Final question: Show different occupations along with the number of players in each occupation.
Final SQL: SELECT Occupation ,  COUNT(*) FROM player GROUP BY Occupation
Database: riding_club
Question sequence:
Show the unique occupation for the players?
How many in total?
Which is the most popular occupation?
SQL query sequence:
SELECT distinct Occupation FROM player
SELECT count(distinct Occupation) FROM player
SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1
Final question: Please show the most common occupation of players.
Final SQL: SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1
Database: riding_club
Question sequence:
Show the unique residences for the players?
How many in total?
Which residences have only one player?
What about at least two?
SQL query sequence:
SELECT distinct Residence FROM player
SELECT count(distinct Residence) FROM player
SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*)  =  1
SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*)  >=  2
Final question: Show the residences that have at least two players.
Final SQL: SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*)  >=  2
Database: riding_club
Question sequence:
List the name and gender of players
How many coaches are there?
Show the name of each player and also the corresponding coach name of each.
SQL query sequence:
SELECT Player_name, Gender FROM player
SELECT count(*) FROM coach
SELECT T3.Player_name ,  T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID
Final question: Show the names of players and names of their coaches.
Final SQL: SELECT T3.Player_name ,  T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID
Database: riding_club
Question sequence:
Which coaches are rank in the 1st and 2nd place?
Which coach is the 1st, show the name of the coach?
What are the names of players of that coach?
SQL query sequence:
SELECT Coach_name FROM coach where rank < 3
SELECT Coach_name FROM coach where rank = 1
SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID WHERE T2.Rank  =  1
Final question: Show the names of players coached by the rank 1 coach.
Final SQL: SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID WHERE T2.Rank  =  1
Database: riding_club
Question sequence:
List the name of players
Show the name of each player and also the corresponding coach name.
Which pair starts before 2012?
What about after 2011?
Only show the player names and genders of those results.
SQL query sequence:
SELECT Player_name FROM player
SELECT T3.Player_name ,  T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID
SELECT T3.Player_name ,  T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID WHERE T1.Starting_year  <  2012
SELECT T3.Player_name ,  T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID WHERE T1.Starting_year  >  2011
SELECT T3.Player_name ,  T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID WHERE T1.Starting_year  >  2011
Final question: Show the names and genders of players with a coach starting after 2011.
Final SQL: SELECT T3.Player_name ,  T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID WHERE T1.Starting_year  >  2011
Database: riding_club
Question sequence:
List the name of players
How many coaches in total?
Show the name of each player and also the corresponding coach name of each.
Who is Ross Eadie's coach?
List all the player-coach name pair with the vote of players, in descending order.
SQL query sequence:
SELECT Player_name FROM player
SELECT count(*) FROM coach
SELECT T3.Player_name ,  T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID
SELECT T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID where T3.Player_name = 'Ross Eadie'
SELECT T3.Player_name ,  T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID ORDER BY T3.Votes DESC
Final question: Show the names of players and names of their coaches in descending order of the votes of players.
Final SQL: SELECT T3.Player_name ,  T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID ORDER BY T3.Votes DESC
Database: riding_club
Question sequence:
How many players are there?
What about coaches?
Which players do not have a coach?
SQL query sequence:
SELECT count(*) FROM player
SELECT count(*) FROM coach
SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM player_coach)
Final question: List the names of players that do not have coaches.
Final SQL: SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM player_coach)
Database: riding_club
Question sequence:
How many female players are there?
What about male players?
What are the residences of them?
Which residences have both female and male players?
SQL query sequence:
SELECT count(*) FROM player where gender = 'F'
SELECT count(*) FROM player where gender = 'M'
SELECT Residence FROM player where gender = 'M'
SELECT Residence FROM player WHERE gender  =  "M" INTERSECT SELECT Residence FROM player WHERE gender  =  "F"
Final question: Show the residences that have both a player of gender "M" and a player of gender "F".
Final SQL: SELECT Residence FROM player WHERE gender  =  "M" INTERSECT SELECT Residence FROM player WHERE gender  =  "F"
Database: riding_club
Question sequence:
How many clubs are there?
How many coaches in total?
How many coaches are there from 'AIK' club?
How many coaches in each club, give the club id, club name and number of coaches.
SQL query sequence:
SELECT count(club_id) FROM club
SELECT count(*) FROM coach
SELECT count(*) FROM coach as T1 join club as T2 on T1.club_id = T2.club_id where T2.club_name = "AIK"
SELECT T1.club_id ,  T1.club_name, count(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id  =  T2.club_id GROUP BY T1.club_id
Final question: How many coaches does each club has? List the club id, name and the number of coaches.
Final SQL: SELECT T1.club_id ,  T1.club_name, count(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id  =  T2.club_id GROUP BY T1.club_id
Database: railway
Question sequence:
List all the railways.
How many in total?
SQL query sequence:
SELECT * FROM railway
SELECT count(*) FROM railway
Final question: How many railways are there?
Final SQL: SELECT count(*) FROM railway
Database: railway
Question sequence:
Show all the builders of the railway.
Order them in ascending alphabetical order.
SQL query sequence:
SELECT Builder FROM railway
SELECT Builder FROM railway ORDER BY Builder ASC
Final question: List the builders of railways in ascending alphabetical order.
Final SQL: SELECT Builder FROM railway ORDER BY Builder ASC
Database: railway
Question sequence:
Show the wheels and also locations of each railway.
SQL query sequence:
SELECT Wheels ,  LOCATION FROM railway
Final question: List the wheels and locations of the railways.
Final SQL: SELECT Wheels ,  LOCATION FROM railway
Database: railway
Question sequence:
Show all the level of managers.
What is the average level?
What is that of the managers that come from "United States"?
What is the maximum level of managers that do not come from "Australia"?
SQL query sequence:
SELECT LEVEL FROM manager
SELECT avg(LEVEL) FROM manager
SELECT avg(LEVEL) FROM manager WHERE Country != "United States"
SELECT max(LEVEL) FROM manager WHERE Country != "Australia	"
Final question: What is the maximum level of managers in countries that are not "Australia"?
Final SQL: SELECT max(LEVEL) FROM manager WHERE Country != "Australia	"