minktn/spider-data huggingface dataset:
Database: formula_1
Question: What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?
SQL: SELECT avg(T2.fastestlapspeed) ,  T1.name ,  T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year
Database: formula_1
Question: What is the average fastest lap speed for races held after 2004, for each race, ordered by year?
SQL: SELECT avg(T2.fastestlapspeed) ,  T1.name ,  T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year
Database: formula_1
Question: Find the id, forename and number of races of all drivers who have at least participated in two races?
SQL: SELECT T1.driverid ,  T1.forename ,  count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*)  >=  2
Database: formula_1
Question: What is the id, forename, and number of races for all drivers that have participated in at least 2 races?
SQL: SELECT T1.driverid ,  T1.forename ,  count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*)  >=  2
Database: formula_1
Question: Find the driver id and number of races of all drivers who have at most participated in 30 races?
SQL: SELECT T1.driverid ,  count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*)  <=  30
Database: formula_1
Question: For each id of a driver who participated in at most 30 races, how many races did they participate in?
SQL: SELECT T1.driverid ,  count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*)  <=  30
Database: formula_1
Question: Find the id and surname of the driver who participated the most number of races?
SQL: SELECT T1.driverid ,  T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1
Database: formula_1
Question: What are the ids and last names of all drivers who participated in the most races?
SQL: SELECT T1.driverid ,  T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1
Database: machine_repair
Question: How many technicians are there?
SQL: SELECT count(*) FROM technician
Database: machine_repair
Question: What is the number of technicians?
SQL: SELECT count(*) FROM technician
Database: machine_repair
Question: List the names of technicians in ascending order of age.
SQL: SELECT Name FROM technician ORDER BY Age ASC
Database: machine_repair
Question: What are the names of the technicians by ascending order of age?
SQL: SELECT Name FROM technician ORDER BY Age ASC
Database: machine_repair
Question: What are the team and starting year of technicians?
SQL: SELECT Team ,  Starting_Year FROM technician
Database: machine_repair
Question: What is the team and starting year for each technician?
SQL: SELECT Team ,  Starting_Year FROM technician
Database: machine_repair
Question: List the name of technicians whose team is not "NYY".
SQL: SELECT Name FROM technician WHERE Team != "NYY"
Database: machine_repair
Question: What is the name of the technician whose team is not 'NYY'?
SQL: SELECT Name FROM technician WHERE Team != "NYY"
Database: machine_repair
Question: Show the name of technicians aged either 36 or 37
SQL: SELECT Name FROM technician WHERE Age  =  36 OR Age  =  37
Database: machine_repair
Question: What are the names of the technicians aged either 36 or 37?
SQL: SELECT Name FROM technician WHERE Age  =  36 OR Age  =  37
Database: machine_repair
Question: What is the starting year of the oldest technicians?
SQL: SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1
Database: machine_repair
Question: What is the starting year for the oldest technician?
SQL: SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1
Database: machine_repair
Question: Show different teams of technicians and the number of technicians in each team.
SQL: SELECT Team ,  COUNT(*) FROM technician GROUP BY Team
Database: machine_repair
Question: For each team, how many technicians are there?
SQL: SELECT Team ,  COUNT(*) FROM technician GROUP BY Team
Database: machine_repair
Question: Please show the team that has the most number of technicians.
SQL: SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1
Database: machine_repair
Question: What are the teams with the most technicians?
SQL: SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1
Database: machine_repair
Question: Show the team that have at least two technicians.
SQL: SELECT Team FROM technician GROUP BY Team HAVING COUNT(*)  >=  2
Database: machine_repair
Question: What is the team with at least 2 technicians?
SQL: SELECT Team FROM technician GROUP BY Team HAVING COUNT(*)  >=  2
Database: machine_repair
Question: Show names of technicians and series of machines they are assigned to repair.
SQL: SELECT T3.Name ,  T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID
Database: machine_repair
Question: What are the names of technicians and the machine series that they repair?
SQL: SELECT T3.Name ,  T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID
Database: machine_repair
Question: Show names of technicians in ascending order of quality rank of the machine they are assigned.
SQL: SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID ORDER BY T2.quality_rank
Database: machine_repair
Question: What are the names of the technicians by ascending order of quality rank for the machine they are assigned?
SQL: SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID ORDER BY T2.quality_rank
Database: machine_repair
Question: Show names of technicians who are assigned to repair machines with value point more than 70.
SQL: SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID WHERE T2.value_points  >  70
Database: machine_repair
Question: What are the names of the technicians that are assigned to repair machines with more point values than 70?
SQL: SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID WHERE T2.value_points  >  70
Database: machine_repair
Question: Show names of technicians and the number of machines they are assigned to repair.
SQL: SELECT T2.Name ,  COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID  =  T2.technician_ID GROUP BY T2.Name
Database: machine_repair
Question: What are the names of the technicians  and how many machines are they assigned to repair?
SQL: SELECT T2.Name ,  COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID  =  T2.technician_ID GROUP BY T2.Name
Database: machine_repair
Question: List the names of technicians who have not been assigned to repair machines.
SQL: SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)
Database: machine_repair
Question: What are the names of the technicians that have not been assigned to repair machines?
SQL: SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)
Database: machine_repair
Question: Show the starting years shared by technicians from team "CLE" and "CWS".
SQL: SELECT Starting_Year FROM technician WHERE Team  =  "CLE" INTERSECT SELECT Starting_Year FROM technician WHERE Team  =  "CWS"
Database: machine_repair
Question: What are the starting years shared by the technicians from the team "CLE" or "CWS"?
SQL: SELECT Starting_Year FROM technician WHERE Team  =  "CLE" INTERSECT SELECT Starting_Year FROM technician WHERE Team  =  "CWS"
Database: entrepreneur
Question: How many entrepreneurs are there?
SQL: SELECT count(*) FROM entrepreneur
Database: entrepreneur
Question: Count the number of entrepreneurs.
SQL: SELECT count(*) FROM entrepreneur
Database: entrepreneur
Question: List the companies of entrepreneurs in descending order of money requested.
SQL: SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC
Database: entrepreneur
Question: What are the companies of entrepreneurs, ordered descending by amount of money requested?
SQL: SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC
Database: entrepreneur
Question: List the companies and the investors of entrepreneurs.
SQL: SELECT Company ,  Investor FROM entrepreneur
Database: entrepreneur
Question: What are the companies and investors that correspond to each entrepreneur?
SQL: SELECT Company ,  Investor FROM entrepreneur
Database: entrepreneur
Question: What is the average money requested by all entrepreneurs?
SQL: SELECT avg(Money_Requested) FROM entrepreneur
Database: entrepreneur
Question: Return the average money requested across all entrepreneurs.
SQL: SELECT avg(Money_Requested) FROM entrepreneur
Database: entrepreneur
Question: What are the names of people in ascending order of weight?
SQL: SELECT Name FROM People ORDER BY Weight ASC
Database: entrepreneur
Question: Return the names of people, ordered by weight ascending.
SQL: SELECT Name FROM People ORDER BY Weight ASC
Database: entrepreneur
Question: What are the names of entrepreneurs?
SQL: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
Database: entrepreneur
Question: Return the names of entrepreneurs.
SQL: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
Database: entrepreneur
Question: What are the names of entrepreneurs whose investor is not "Rachel Elnaugh"?
SQL: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor != "Rachel Elnaugh"
Database: entrepreneur
Question: Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.
SQL: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor != "Rachel Elnaugh"
Database: entrepreneur
Question: What is the weight of the shortest person?
SQL: SELECT Weight FROM people ORDER BY Height ASC LIMIT 1
Database: entrepreneur
Question: Return the weight of the shortest person.
SQL: SELECT Weight FROM people ORDER BY Height ASC LIMIT 1
Database: entrepreneur
Question: What is the name of the entrepreneur with the greatest weight?
SQL: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Weight DESC LIMIT 1
Database: entrepreneur
Question: Return the name of the heaviest entrepreneur.
SQL: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Weight DESC LIMIT 1
Database: entrepreneur
Question: What is the total money requested by entrepreneurs with height more than 1.85?
SQL: SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Height  >  1.85
Database: entrepreneur
Question: Give the total money requested by entrepreneurs who are taller than 1.85.
SQL: SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Height  >  1.85
Database: entrepreneur
Question: What are the dates of birth of entrepreneurs with investor "Simon Woodroffe" or "Peter Jones"?
SQL: SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor  =  "Simon Woodroffe" OR T1.Investor  =  "Peter Jones"
Database: entrepreneur
Question: Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.
SQL: SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor  =  "Simon Woodroffe" OR T1.Investor  =  "Peter Jones"
Database: entrepreneur
Question: What are the weights of entrepreneurs in descending order of money requested?
SQL: SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested DESC
Database: entrepreneur
Question: Return the weights of entrepreneurs, ordered descending by amount of money requested.
SQL: SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested DESC
Database: entrepreneur
Question: What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?
SQL: SELECT Investor ,  COUNT(*) FROM entrepreneur GROUP BY Investor
Database: entrepreneur
Question: How many entrepreneurs correspond to each investor?
SQL: SELECT Investor ,  COUNT(*) FROM entrepreneur GROUP BY Investor
Database: entrepreneur
Question: What is the investor that has invested in the most number of entrepreneurs?
SQL: SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1
Database: entrepreneur
Question: Return the investor who have invested in the greatest number of entrepreneurs.
SQL: SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1
Database: entrepreneur
Question: What are the investors that have invested in at least two entrepreneurs?
SQL: SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*)  >=  2
Database: entrepreneur
Question: Return the investors who have invested in two or more entrepreneurs.
SQL: SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*)  >=  2
Database: entrepreneur
Question: List the names of entrepreneurs and their companies in descending order of money requested?
SQL: SELECT T2.Name ,  T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested
Database: entrepreneur
Question: What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?
SQL: SELECT T2.Name ,  T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested
Database: entrepreneur
Question: List the names of people that are not entrepreneurs.
SQL: SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur)
Database: entrepreneur
Question: What are the names of people who are not entrepreneurs?
SQL: SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur)
Database: entrepreneur
Question: Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.
SQL: SELECT Investor FROM entrepreneur WHERE Money_Requested  >  140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested  <  120000
Database: entrepreneur
Question: What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?
SQL: SELECT Investor FROM entrepreneur WHERE Money_Requested  >  140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested  <  120000
Database: entrepreneur
Question: How many distinct companies are there?
SQL: SELECT count(DISTINCT Company) FROM entrepreneur
Database: entrepreneur
Question: Count the number of different companies.
SQL: SELECT count(DISTINCT Company) FROM entrepreneur
Database: entrepreneur
Question: Show the company of the tallest entrepreneur.
SQL: SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Height DESC LIMIT 1
Database: entrepreneur
Question: Which company was started by the entrepreneur with the greatest height?
SQL: SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Height DESC LIMIT 1
Database: perpetrator
Question: How many perpetrators are there?
SQL: SELECT count(*) FROM perpetrator
Database: perpetrator
Question: List the date of perpetrators in descending order of the number of people killed.
SQL: SELECT Date FROM perpetrator ORDER BY Killed DESC
Database: perpetrator
Question: List the number of people injured by perpetrators in ascending order.
SQL: SELECT Injured FROM perpetrator ORDER BY Injured ASC
Database: perpetrator
Question: What is the average number of people injured by all perpetrators?
SQL: SELECT avg(Injured) FROM perpetrator
Database: perpetrator
Question: What is the location of the perpetrator with the largest kills.
SQL: SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1
Database: perpetrator
Question: What are the names of people in ascending order of height?
SQL: SELECT Name FROM People ORDER BY Height ASC
Database: perpetrator
Question: What are the names of perpetrators?
SQL: SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID
Database: perpetrator
Question: What are the names of perpetrators whose country is not "China"?
SQL: SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Country != "China"
Database: perpetrator
Question: What is the name of the perpetrator with the biggest weight.
SQL: SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Weight DESC LIMIT 1
Database: perpetrator
Question: What is the total kills of the perpetrators with height more than 1.84.
SQL: SELECT sum(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Height  >  1.84
Database: perpetrator
Question: What are the names of perpetrators in country "China" or "Japan"?
SQL: SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Country  =  "China" OR T2.Country  =  "Japan"
Database: perpetrator
Question: What are the heights of perpetrators in descending order of the number of people they injured?
SQL: SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Injured DESC
Database: perpetrator
Question: What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.
SQL: SELECT Country ,  COUNT(*) FROM perpetrator GROUP BY Country
Database: perpetrator
Question: What is the country that has the most perpetrators?
SQL: SELECT Country ,  COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
Database: perpetrator
Question: What are the countries that have at least two perpetrators?
SQL: SELECT Country ,  COUNT(*) FROM perpetrator GROUP BY Country HAVING COUNT(*)  >=  2
Database: perpetrator
Question: List the names of perpetrators in descending order of the year.
SQL: SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Year DESC
Database: perpetrator
Question: List the names of people that are not perpetrators.
SQL: SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM perpetrator)
Database: perpetrator
Question: Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.
SQL: SELECT Country FROM perpetrator WHERE Injured  >  50 INTERSECT SELECT Country FROM perpetrator WHERE Injured  <  20
Database: perpetrator
Question: How many distinct locations of perpetrators are there?
SQL: SELECT count(DISTINCT LOCATION) FROM perpetrator
Database: perpetrator
Question: Show the date of the tallest perpetrator.
SQL: SELECT T2.Date FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Height DESC LIMIT 1
Database: csu_1
Question: Report the name of all campuses in Los Angeles county.
SQL: SELECT campus FROM campuses WHERE county  =  "Los Angeles"
Database: csu_1
Question: What campuses are located in the county of Los Angeles?
SQL: SELECT campus FROM campuses WHERE county  =  "Los Angeles"
Database: csu_1
Question: What are the names of all campuses located at Chico?
SQL: SELECT campus FROM campuses WHERE LOCATION  =  "Chico"
Database: csu_1
Question: What campuses are located in Chico?
SQL: SELECT campus FROM campuses WHERE LOCATION  =  "Chico"
Database: csu_1
Question: Find all the campuses opened in 1958.
SQL: SELECT campus FROM campuses WHERE YEAR  =  1958
Database: csu_1
Question: What are the campuses that opened in 1958?
SQL: SELECT campus FROM campuses WHERE YEAR  =  1958
Database: csu_1
Question: Find the name of the campuses opened before 1800.
SQL: SELECT campus FROM campuses WHERE YEAR  <  1800
Database: csu_1
Question: What campuses opened before 1800?
SQL: SELECT campus FROM campuses WHERE YEAR  <  1800
Database: csu_1
Question: Which campus was opened between 1935 and 1939?
SQL: SELECT campus FROM campuses WHERE YEAR  >=  1935 AND YEAR  <=  1939
Database: csu_1
Question: What campuses opened between 1935 and 1939?
SQL: SELECT campus FROM campuses WHERE YEAR  >=  1935 AND YEAR  <=  1939
Database: csu_1
Question: Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.
SQL: SELECT campus FROM campuses WHERE LOCATION  =  "Northridge" AND county  =  "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION  =  "San Francisco" AND county  =  "San Francisco"
Database: csu_1
Question: What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?
SQL: SELECT campus FROM campuses WHERE LOCATION  =  "Northridge" AND county  =  "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION  =  "San Francisco" AND county  =  "San Francisco"
Database: csu_1
Question: What is the campus fee of "San Jose State University" in year 1996?
SQL: SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id  =  t2.campus WHERE t1.campus  =  "San Jose State University" AND T2.year  =  1996
Database: csu_1
Question: What is the campus fee for San Jose State University in 1996?
SQL: SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id  =  t2.campus WHERE t1.campus  =  "San Jose State University" AND T2.year  =  1996
Database: csu_1
Question: What is the campus fee of "San Francisco State University" in year 1996?
SQL: SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id  =  t2.campus WHERE t1.campus  =  "San Francisco State University" AND T2.year  =  1996
Database: csu_1
Question: What is the campus fee for San Francisco State University in 1996?
SQL: SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id  =  t2.campus WHERE t1.campus  =  "San Francisco State University" AND T2.year  =  1996
Database: csu_1
Question: Find the count of universities whose campus fee is greater than the average campus fee.
SQL: SELECT count(*) FROM csu_fees WHERE campusfee  >  (SELECT avg(campusfee) FROM csu_fees)
Database: csu_1
Question: How many universities have a campus fee higher than average?
SQL: SELECT count(*) FROM csu_fees WHERE campusfee  >  (SELECT avg(campusfee) FROM csu_fees)
Database: csu_1
Question: How many universities have a campus fee greater than the average?
SQL: SELECT count(*) FROM csu_fees WHERE campusfee  >  (SELECT avg(campusfee) FROM csu_fees)
Database: csu_1
Question: Which university is in Los Angeles county and opened after 1950?
SQL: SELECT campus FROM campuses WHERE county  =  "Los Angeles" AND YEAR  >  1950
Database: csu_1
Question: What campuses are located in Los Angeles county and opened after 1950?
SQL: SELECT campus FROM campuses WHERE county  =  "Los Angeles" AND YEAR  >  1950
Database: csu_1
Question: Which year has the most degrees conferred?
SQL: SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1
Database: csu_1
Question: In what year was the most degrees conferred?
SQL: SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1
Database: csu_1
Question: Which campus has the most degrees conferred in all times?
SQL: SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1
Database: csu_1
Question: What campus has the most degrees  conferrred over its entire existence?
SQL: SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1
Database: csu_1
Question: Which campus has the most faculties in year 2003?
SQL: SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2003 ORDER BY T2.faculty DESC LIMIT 1
Database: csu_1
Question: What campus has the most faculties in 2003?
SQL: SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2003 ORDER BY T2.faculty DESC LIMIT 1
Database: csu_1
Question: Find the average fee on a CSU campus in 1996
SQL: SELECT avg(campusfee) FROM csu_fees WHERE YEAR  =  1996
Database: csu_1
Question: What is the average fee for a CSU campus in the year of 1996?
SQL: SELECT avg(campusfee) FROM csu_fees WHERE YEAR  =  1996
Database: csu_1
Question: What is the average fee on a CSU campus in 2005?
SQL: SELECT avg(campusfee) FROM csu_fees WHERE YEAR  =  2005
Database: csu_1
Question: What is the average fee for a CSU campus in the year of 2005?
SQL: SELECT avg(campusfee) FROM csu_fees WHERE YEAR  =  2005
Database: csu_1
Question: report the total number of degrees granted between 1998 and 2002.
SQL: SELECT T1.campus ,  sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id  =  T2.campus WHERE T2.year  >=  1998 AND T2.year  <=  2002 GROUP BY T1.campus
Database: csu_1
Question: how many degrees were conferred between 1998 and 2002?
SQL: SELECT T1.campus ,  sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id  =  T2.campus WHERE T2.year  >=  1998 AND T2.year  <=  2002 GROUP BY T1.campus
Database: csu_1
Question: For each Orange county campus, report the number of degrees granted after 2000.
SQL: SELECT T1.campus ,  sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id  =  T2.campus WHERE T1.county  =  "Orange" AND T2.year  >=  2000 GROUP BY T1.campus
Database: csu_1
Question: What is the total number of degrees granted after 2000 for each Orange county campus?
SQL: SELECT T1.campus ,  sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id  =  T2.campus WHERE T1.county  =  "Orange" AND T2.year  >=  2000 GROUP BY T1.campus
Database: csu_1
Question: Find the names of the campus which has more faculties in 2002 than every campus in Orange county.
SQL: SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2002 AND faculty  >  (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2002 AND T1.county  =  "Orange")
Database: csu_1
Question: What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?
SQL: SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2002 AND faculty  >  (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2002 AND T1.county  =  "Orange")
Database: csu_1
Question: What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?
SQL: SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id  =  t2.campus WHERE t2.year  =  1956 AND totalenrollment_ay  >  400 AND FTE_AY  >  200
Database: csu_1
Question: What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?
SQL: SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id  =  t2.campus WHERE t2.year  =  1956 AND totalenrollment_ay  >  400 AND FTE_AY  >  200
Database: csu_1
Question: How many campuses are there in Los Angeles county?
SQL: SELECT count(*) FROM campuses WHERE county  =  "Los Angeles"
Database: csu_1
Question: How many campuses exist are in the county of LA?
SQL: SELECT count(*) FROM campuses WHERE county  =  "Los Angeles"
Database: csu_1
Question: List the campuses in Los Angeles county.
SQL: SELECT campus FROM campuses WHERE county  =  "Los Angeles"
Database: csu_1
Question: What campuses are in Los Angeles county?
SQL: SELECT campus FROM campuses WHERE county  =  "Los Angeles"
Database: csu_1
Question: How many degrees were conferred in "San Jose State University" in 2000?
SQL: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Jose State University" AND t2.year  =  2000
Database: csu_1
Question: How many degrees were conferred at San Jose State University in 2000?
SQL: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Jose State University" AND t2.year  =  2000
Database: csu_1
Question: What are the degrees conferred in "San Francisco State University" in 2001.
SQL: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Francisco State University" AND t2.year  =  2001
Database: csu_1
Question: What degrees were conferred in San Francisco State University in the year 2001?
SQL: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Francisco State University" AND t2.year  =  2001
Database: csu_1
Question: How many faculty is there in total in the year of 2002?
SQL: SELECT sum(faculty) FROM faculty WHERE YEAR  =  2002
Database: csu_1
Question: How many faculty, in total, are there in the year 2002?
SQL: SELECT sum(faculty) FROM faculty WHERE YEAR  =  2002
Database: csu_1
Question: What is the number of faculty lines in campus "Long Beach State University" in 2002?
SQL: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2002 AND T2.campus  =  "Long Beach State University"
Database: csu_1
Question: What is the number of faculty at Long Beach State University in 2002?
SQL: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2002 AND T2.campus  =  "Long Beach State University"
Database: csu_1
Question: How many faculty lines are there in "San Francisco State University" in year 2004?
SQL: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2004 AND T2.campus  =  "San Francisco State University"
Database: csu_1
Question: How many faculty lines are there at San Francisco State University in 2004?
SQL: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2004 AND T2.campus  =  "San Francisco State University"
Database: csu_1
Question: List the campus that have between 600 and 1000 faculty lines in year 2004.
SQL: SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id  =  t2.campus WHERE t2.faculty  >=  600 AND t2.faculty  <=  1000 AND T1.year  =  2004
Database: csu_1
Question: What are the campuses that had between 600 and 1000 faculty members in 2004?
SQL: SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id  =  t2.campus WHERE t2.faculty  >=  600 AND t2.faculty  <=  1000 AND T1.year  =  2004
Database: csu_1
Question: How many faculty lines are there in the university that conferred the most number of degrees in year 2002?
SQL: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  t2.campus JOIN degrees AS T3 ON T1.id  =  t3.campus AND t2.year  =  t3.year WHERE t2.year  =  2002 ORDER BY t3.degrees DESC LIMIT 1
Database: csu_1
Question: How many faculty members did the university that conferred the most degrees in 2002 have?
SQL: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  t2.campus JOIN degrees AS T3 ON T1.id  =  t3.campus AND t2.year  =  t3.year WHERE t2.year  =  2002 ORDER BY t3.degrees DESC LIMIT 1
Database: csu_1
Question: How many faculty lines are there in the university that conferred the least number of degrees in year 2001?
SQL: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  t2.campus JOIN degrees AS T3 ON T1.id  =  t3.campus AND t2.year  =  t3.year WHERE t2.year  =  2001 ORDER BY t3.degrees LIMIT 1
Database: csu_1
Question: How many faculty members are at the university that gave the least number of degrees in 2001?
SQL: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  t2.campus JOIN degrees AS T3 ON T1.id  =  t3.campus AND t2.year  =  t3.year WHERE t2.year  =  2001 ORDER BY t3.degrees LIMIT 1
Database: csu_1
Question: How many undergraduates are there in "San Jose State University" in year 2004?
SQL: SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Jose State University"
Database: csu_1
Question: How many undergraduates are there at San Jose State
SQL: SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Jose State University"
Database: csu_1
Question: What is the number of graduates in "San Francisco State University" in year 2004?
SQL: SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Francisco State University"
Database: csu_1
Question: How many people graduated from San Francisco State University in 2004?
SQL: SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Francisco State University"
Database: csu_1
Question: What is the campus fee of "San Francisco State University" in year 2000?
SQL: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Francisco State University" AND t1.year  =  2000
Database: csu_1
Question: In the year 2000, what is the campus fee for San Francisco State University?
SQL: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Francisco State University" AND t1.year  =  2000
Database: csu_1
Question: Find the campus fee of "San Jose State University" in year 2000.
SQL: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Jose State University" AND t1.year  =  2000
Database: csu_1
Question: What is the campus fee in the year 2000 for San Jose State University?
SQL: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Jose State University" AND t1.year  =  2000
Database: csu_1
Question: How many CSU campuses are there?
SQL: SELECT count(*) FROM campuses
Database: csu_1
Question: What is the total number of campuses?
SQL: SELECT count(*) FROM campuses
Database: candidate_poll
Question: How many candidates are there?
SQL: SELECT count(*) FROM candidate
Database: candidate_poll
Question: Count the number of candidates.
SQL: SELECT count(*) FROM candidate
Database: candidate_poll
Question: Which poll resource provided the most number of candidate information?
SQL: SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1
Database: candidate_poll
Question: Return the poll resource associated with the most candidates.
SQL: SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1
Database: candidate_poll
Question: what are the top 3 highest support rates?
SQL: SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3
Database: candidate_poll
Question: Return the top 3 greatest support rates.
SQL: SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3
Database: candidate_poll
Question: Find the id of the candidate who got the lowest oppose rate.
SQL: SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1
Database: candidate_poll
Question: What is the id of the candidate with the lowest oppose rate?
SQL: SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1
Database: candidate_poll
Question: Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.
SQL: SELECT Support_rate ,  Consider_rate ,  Oppose_rate FROM candidate ORDER BY unsure_rate
Database: candidate_poll
Question: What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?
SQL: SELECT Support_rate ,  Consider_rate ,  Oppose_rate FROM candidate ORDER BY unsure_rate
Database: candidate_poll
Question: which poll source does the highest oppose rate come from?
SQL: SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1
Database: candidate_poll
Question: Return the poll source corresponding to the candidate who has the oppose rate.
SQL: SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1
Database: candidate_poll
Question: List all people names in the order of their date of birth from old to young.
SQL: SELECT name FROM people ORDER BY date_of_birth
Database: candidate_poll
Question: What are the names of all people, ordered by their date of birth?
SQL: SELECT name FROM people ORDER BY date_of_birth
Database: candidate_poll
Question: Find the average height and weight for all males (sex is M).
SQL: SELECT avg(height) ,  avg(weight) FROM people WHERE sex  =  'M'
Database: candidate_poll
Question: What are the average height and weight across males (sex is M)?
SQL: SELECT avg(height) ,  avg(weight) FROM people WHERE sex  =  'M'
Database: candidate_poll
Question: find the names of people who are taller than 200 or lower than 190.
SQL: SELECT name FROM people WHERE height  >  200 OR height  <  190
Database: candidate_poll
Question: What are the names of people who have a height greater than 200 or less than 190?
SQL: SELECT name FROM people WHERE height  >  200 OR height  <  190
Database: candidate_poll
Question: Find the average and minimum weight for each gender.
SQL: SELECT avg(weight) ,  min(weight) ,  sex FROM people GROUP BY sex
Database: candidate_poll
Question: What are the average and minimum weights for people of each sex?
SQL: SELECT avg(weight) ,  min(weight) ,  sex FROM people GROUP BY sex
Database: candidate_poll
Question: Find the name and gender of the candidate who got the highest support rate.
SQL: SELECT t1.name ,  t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id ORDER BY t2.support_rate DESC LIMIT 1
Database: candidate_poll
Question: What is the name and sex of the candidate with the highest support rate?
SQL: SELECT t1.name ,  t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id ORDER BY t2.support_rate DESC LIMIT 1
Database: candidate_poll
Question: Find the name of the candidates whose oppose percentage is the lowest for each sex.
SQL: SELECT t1.name ,  t1.sex ,  min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id GROUP BY t1.sex
Database: candidate_poll
Question: For each sex, what is the name and sex of the candidate with the oppose rate for their sex?
SQL: SELECT t1.name ,  t1.sex ,  min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id GROUP BY t1.sex
Database: candidate_poll
Question: which gender got the highest average uncertain ratio.
SQL: SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1
Database: candidate_poll
Question: What is the sex of the candidate who had the highest unsure rate?
SQL: SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1
Database: candidate_poll
Question: what are the names of people who did not participate in the candidate election.
SQL: SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate)
Database: candidate_poll
Question: Give the names of people who did not participate in the candidate election.
SQL: SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate)
Database: candidate_poll
Question: Find the names of the candidates whose support percentage is lower than their oppose rate.
SQL: SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id WHERE t2.support_rate  <  t2.oppose_rate
Database: candidate_poll
Question: What are the names of candidates who have a lower support rate than oppose rate?
SQL: SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id WHERE t2.support_rate  <  t2.oppose_rate
Database: candidate_poll
Question: how many people are there whose weight is higher than 85 for each gender?
SQL: SELECT count(*) ,  sex FROM people WHERE weight  >  85 GROUP BY sex
Database: candidate_poll
Question: Count the number of people of each sex who have a weight higher than 85.
SQL: SELECT count(*) ,  sex FROM people WHERE weight  >  85 GROUP BY sex
Database: candidate_poll
Question: find the highest support percentage, lowest consider rate and oppose rate of all candidates.
SQL: SELECT max(support_rate) ,  min(consider_rate) ,  min(oppose_rate) FROM candidate
Database: candidate_poll
Question: Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?
SQL: SELECT max(support_rate) ,  min(consider_rate) ,  min(oppose_rate) FROM candidate
Database: candidate_poll
Question: list all female (sex is F) candidate names in the alphabetical order.
SQL: SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id WHERE t1.sex  =  'F' ORDER BY t1.name
Database: candidate_poll
Question: What are the names of all female candidates in alphabetical order (sex is F)?
SQL: SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id WHERE t1.sex  =  'F' ORDER BY t1.name
Database: candidate_poll
Question: find the name of people whose height is lower than the average.
SQL: SELECT name FROM people WHERE height  <  (SELECT avg(height) FROM people)
Database: candidate_poll
Question: What are the names of people who are shorter than average?
SQL: SELECT name FROM people WHERE height  <  (SELECT avg(height) FROM people)
Database: candidate_poll
Question: List all info about all people.
SQL: SELECT * FROM people
Database: candidate_poll
Question: What is all the information about all people?
SQL: SELECT * FROM people
Database: movie_1
Question: Find the titles of all movies directed by steven spielberg.
SQL: SELECT title FROM Movie WHERE director = 'Steven Spielberg'
Database: movie_1
Question: What are the names of all movies directed by Steven Spielberg?
SQL: SELECT title FROM Movie WHERE director = 'Steven Spielberg'
Database: movie_1
Question: What is the name of the movie produced after 2000 and directed by James Cameron?
SQL: SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR  >  2000
Database: movie_1
Question: What are the titles of all movies that James Cameron directed after 2000?
SQL: SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR  >  2000
Database: movie_1
Question: How many movies were made before 2000?
SQL: SELECT count(*) FROM Movie WHERE YEAR  <  2000
Database: movie_1
Question: Who is the director of movie Avatar?
SQL: SELECT director FROM Movie WHERE title  = 'Avatar'
Database: movie_1
Question: Who directed Avatar?
SQL: SELECT director FROM Movie WHERE title  = 'Avatar'
Database: movie_1
Question: How many reviewers listed?
SQL: SELECT count(*) FROM Reviewer
Database: movie_1
Question: How many reviewers are there?
SQL: SELECT count(*) FROM Reviewer
Database: movie_1
Question: What is the id of the reviewer whose name has substring “Mike”?
SQL: SELECT rID FROM Reviewer WHERE name LIKE "%Mike%"
Database: movie_1
Question: What is the id of the reviewer whose name includes the word "Mike"?
SQL: SELECT rID FROM Reviewer WHERE name LIKE "%Mike%"
Database: movie_1
Question: What is the reviewer id of Daniel Lewis?
SQL: SELECT rID FROM Reviewer WHERE name  =  "Daniel Lewis"
Database: movie_1
Question: What is the id of the reviewer named Daniel Lewis?
SQL: SELECT rID FROM Reviewer WHERE name  =  "Daniel Lewis"
Database: movie_1
Question: What is the total number of ratings that has more than 3 stars?
SQL: SELECT count(*) FROM Rating WHERE stars  >  3
Database: movie_1
Question: How many movie ratings have more than 3 stars?
SQL: SELECT count(*) FROM Rating WHERE stars  >  3
Database: movie_1
Question: What is the lowest and highest rating star?
SQL: SELECT max(stars) ,  min(stars) FROM Rating
Database: movie_1
Question: What is the maximum and mininum number of stars a rating can receive?
SQL: SELECT max(stars) ,  min(stars) FROM Rating
Database: movie_1
Question: Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.
SQL: SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID WHERE T2.stars  >=  4 ORDER BY T1.year
Database: movie_1
Question: In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently?
SQL: SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID WHERE T2.stars  >=  4 ORDER BY T1.year
Database: movie_1
Question: What are the names of directors who directed movies with 5 star rating? Also return the title of these movies.
SQL: SELECT T1.director ,  T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID WHERE T2.stars  =  5
Database: movie_1
Question: What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?
SQL: SELECT T1.director ,  T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID WHERE T2.stars  =  5
Database: movie_1
Question: What is the average rating star for each reviewer?
SQL: SELECT T2.name ,  avg(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID GROUP BY T2.name
Database: movie_1
Question: What is the average number of stars that each reviewer awards for a movie?
SQL: SELECT T2.name ,  avg(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID GROUP BY T2.name
Database: movie_1
Question: Find the titles of all movies that have no ratings.
SQL: SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)
Database: movie_1
Question: What are the titles of all movies that have not been rated?
SQL: SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)
Database: movie_1
Question: Find the names of all reviewers who have ratings with a NULL value for the date.
SQL: SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID  =  T2.rID WHERE ratingDate  =  "null"
Database: movie_1
Question: What are the different names of all reviewers whose ratings do not have a date field?
SQL: SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID  =  T2.rID WHERE ratingDate  =  "null"
Database: movie_1
Question: What is the average rating stars and title for the oldest movie?
SQL: SELECT avg(T1.stars) ,  T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.year  =  (SELECT min(YEAR) FROM Movie)
Database: movie_1
Question: For the oldest movie listed, what is its average rating and title?
SQL: SELECT avg(T1.stars) ,  T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.year  =  (SELECT min(YEAR) FROM Movie)
Database: movie_1
Question: What is the name of the most recent movie?
SQL: SELECT title FROM Movie WHERE YEAR  =  (SELECT max(YEAR) FROM Movie)
Database: movie_1
Question: What is the title of the newest movie?
SQL: SELECT title FROM Movie WHERE YEAR  =  (SELECT max(YEAR) FROM Movie)
Database: movie_1
Question: What is the maximum stars and year for the most recent movie?
SQL: SELECT max(T1.stars) ,  T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.year  =  (SELECT max(YEAR) FROM Movie)
Database: movie_1
Question: What is highest rating for the most recent movie and when was it released?
SQL: SELECT max(T1.stars) ,  T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.year  =  (SELECT max(YEAR) FROM Movie)
Database: movie_1
Question: What is the names of movies whose created year is after all movies directed by Steven Spielberg?
SQL: SELECT title FROM Movie WHERE YEAR  >  (SELECT max(YEAR) FROM Movie WHERE director  =  "Steven Spielberg")