minktn/spider-data huggingface dataset:
Database: movie_1
Question: What are the names of all movies that were created after the most recent Steven Spielberg film?
SQL: SELECT title FROM Movie WHERE YEAR  >  (SELECT max(YEAR) FROM Movie WHERE director  =  "Steven Spielberg")
Database: movie_1
Question: What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?
SQL: SELECT T2.title ,  T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  >  (SELECT avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.director  =  "James Cameron")
Database: movie_1
Question: What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?
SQL: SELECT T2.title ,  T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  >  (SELECT avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.director  =  "James Cameron")
Database: movie_1
Question: Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars.
SQL: SELECT T3.name ,  T2.title ,  T1.stars ,  T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID ORDER BY T3.name ,  T2.title ,  T1.stars
Database: movie_1
Question: What is the reviewer name, film title, movie rating, and rating date  for every movie ordered by reviewer name, movie title, then finally rating?
SQL: SELECT T3.name ,  T2.title ,  T1.stars ,  T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID ORDER BY T3.name ,  T2.title ,  T1.stars
Database: movie_1
Question: Find the names of all reviewers who have contributed three or more ratings.
SQL: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID GROUP BY T1.rID HAVING COUNT(*)  >=  3
Database: movie_1
Question: What are the names of all reviewers that have rated 3 or more movies?
SQL: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID GROUP BY T1.rID HAVING COUNT(*)  >=  3
Database: movie_1
Question: Find the names of all reviewers who rated Gone with the Wind.
SQL: SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T2.title  =  'Gone with the Wind'
Database: movie_1
Question: What are the names of all the different reviewers who rates Gone with the Wind?
SQL: SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T2.title  =  'Gone with the Wind'
Database: movie_1
Question: Find the names of all directors whose movies are rated by Sarah Martinez.
SQL: SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T3.name  =  'Sarah Martinez'
Database: movie_1
Question: What are the names of all directors whose movies have been reviewed by Sarah Martinez?
SQL: SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T3.name  =  'Sarah Martinez'
Database: movie_1
Question: For any rating where the name of reviewer is the same as the director of the movie, return the reviewer name, movie title, and number of stars.
SQL: SELECT DISTINCT T3.name ,  T2.title ,  T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T2.director  =  T3.name
Database: movie_1
Question: What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?
SQL: SELECT DISTINCT T3.name ,  T2.title ,  T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T2.director  =  T3.name
Database: movie_1
Question: Return all reviewer names and movie names together in a single list.
SQL: SELECT name FROM Reviewer UNION SELECT title FROM Movie
Database: movie_1
Question: What are the names of all the reviewers and movie names?
SQL: SELECT name FROM Reviewer UNION SELECT title FROM Movie
Database: movie_1
Question: Find the titles of all movies not reviewed by Chris Jackson.
SQL: SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T3.name  =  'Chris Jackson'
Database: movie_1
Question: What are the titles of all movies that were not reviewed by Chris Jackson?
SQL: SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T3.name  =  'Chris Jackson'
Database: movie_1
Question: For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title.
SQL: SELECT T1.title ,  T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director  =  T2.director WHERE T1.title != T2.title ORDER BY T1.director ,  T1.title
Database: movie_1
Question: For all directors who have directed more than one movie, what movies have they directed and what are their names?
SQL: SELECT T1.title ,  T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director  =  T2.director WHERE T1.title != T2.title ORDER BY T1.director ,  T1.title
Database: movie_1
Question: For directors who had more than one movie, return the titles and produced years of all movies directed by them.
SQL: SELECT T1.title ,  T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director  =  T2.director WHERE T1.title != T2.title
Database: movie_1
Question: For each director who directed more than one movie, what are the titles and dates of release for all those movies?
SQL: SELECT T1.title ,  T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director  =  T2.director WHERE T1.title != T2.title
Database: movie_1
Question: What are the names of the directors who made exactly one movie?
SQL: SELECT director FROM Movie GROUP BY director HAVING count(*)  =  1
Database: movie_1
Question: What are the names of all directors who made one movie?
SQL: SELECT director FROM Movie GROUP BY director HAVING count(*)  =  1
Database: movie_1
Question: What are the names of the directors who made exactly one movie excluding director NULL?
SQL: SELECT director FROM Movie WHERE director != "null" GROUP BY director HAVING count(*)  =  1
Database: movie_1
Question: What are the names of all directors who have made one movie except for the director named NULL?
SQL: SELECT director FROM Movie WHERE director != "null" GROUP BY director HAVING count(*)  =  1
Database: movie_1
Question: How many movie reviews does each director get?
SQL: SELECT count(*) ,  T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID GROUP BY T1.director
Database: movie_1
Question: For each director, how many reviews have they received?
SQL: SELECT count(*) ,  T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID GROUP BY T1.director
Database: movie_1
Question: Find the movies with the highest average rating. Return the movie titles and average rating.
SQL: SELECT T2.title ,  avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) DESC LIMIT 1
Database: movie_1
Question: What are the movie titles with the highest average rating and what are those ratings?
SQL: SELECT T2.title ,  avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) DESC LIMIT 1
Database: movie_1
Question: What are the movie titles and average rating of the movies with the lowest average rating?
SQL: SELECT T2.title ,  avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) LIMIT 1
Database: movie_1
Question: What are the titles and average ratings for all movies that have the lowest average rating?
SQL: SELECT T2.title ,  avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) LIMIT 1
Database: movie_1
Question: What are the names and years of the movies that has the top 3 highest rating star?
SQL: SELECT T2.title ,  T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID ORDER BY T1.stars DESC LIMIT 3
Database: movie_1
Question: What are the names and years released for the movies with the top 3 highest ratings?
SQL: SELECT T2.title ,  T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID ORDER BY T1.stars DESC LIMIT 3
Database: movie_1
Question: For each director, return the director's name together with the title of the movie they directed that received the highest rating among all of their movies, and the value of that rating. Ignore movies whose director is NULL.
SQL: SELECT T2.title ,  T1.stars ,  T2.director ,  max(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE director != "null" GROUP BY director
Database: movie_1
Question: For each director, what are the titles and ratings for all the movies they reviewed?
SQL: SELECT T2.title ,  T1.stars ,  T2.director ,  max(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE director != "null" GROUP BY director
Database: movie_1
Question: Find the title and star rating of the movie that got the least rating star for each reviewer.
SQL: SELECT T2.title ,  T1.rID ,  T1.stars ,  min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.rID
Database: movie_1
Question: For each reviewer id, what is the title and rating for the movie with the smallest rating?
SQL: SELECT T2.title ,  T1.rID ,  T1.stars ,  min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.rID
Database: movie_1
Question: Find the title and score of the movie with the lowest rating among all movies directed by each director.
SQL: SELECT T2.title ,  T1.stars ,  T2.director ,  min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T2.director
Database: movie_1
Question: For each director, what is the title and score of their most poorly rated movie?
SQL: SELECT T2.title ,  T1.stars ,  T2.director ,  min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T2.director
Database: movie_1
Question: What is the name of the movie that is rated by most of times?
SQL: SELECT T2.title ,  T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1
Database: movie_1
Question: What is the name of the movie that has been reviewed the most?
SQL: SELECT T2.title ,  T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1
Database: movie_1
Question: What are the titles of all movies that have rating star is between 3 and 5?
SQL: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars BETWEEN 3 AND 5
Database: movie_1
Question: What are the titles of all movies that have between 3 and 5 stars?
SQL: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars BETWEEN 3 AND 5
Database: movie_1
Question: Find the names of reviewers who had given higher than 3 star ratings.
SQL: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  >  3
Database: movie_1
Question: What are the names of the reviewers who have rated a movie more than 3 stars before?
SQL: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  >  3
Database: movie_1
Question: Find the average rating star for each movie that are not reviewed by Brittany Harris.
SQL: SELECT mID ,  avg(stars) FROM Rating WHERE mID NOT IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T2.name  =  "Brittany Harris") GROUP BY mID
Database: movie_1
Question: What is the average rating for each movie that has never been reviewed by Brittany Harris?
SQL: SELECT mID ,  avg(stars) FROM Rating WHERE mID NOT IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T2.name  =  "Brittany Harris") GROUP BY mID
Database: movie_1
Question: What are the ids of the movies that are not reviewed by Brittany Harris.
SQL: SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T2.name  =  "Brittany Harris"
Database: movie_1
Question: What are the ids of all moviest hat have not been reviewed by Britanny Harris?
SQL: SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T2.name  =  "Brittany Harris"
Database: movie_1
Question: Find the average rating star for each movie that received at least 2 ratings.
SQL: SELECT mID ,  avg(stars) FROM Rating GROUP BY mID HAVING count(*)  >=  2
Database: movie_1
Question: For each movie that received more than 3 reviews, what is the average rating?
SQL: SELECT mID ,  avg(stars) FROM Rating GROUP BY mID HAVING count(*)  >=  2
Database: movie_1
Question: find the ids of reviewers who did not give 4 star.
SQL: SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars  =  4
Database: movie_1
Question: What are the ids of all reviewers who did not give 4 stars?
SQL: SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars  =  4
Database: movie_1
Question: Find the ids of reviewers who didn't only give 4 star.
SQL: SELECT rID FROM Rating WHERE stars != 4
Database: movie_1
Question: What are the ids of all reviewers who have not given 4 stars at least once?
SQL: SELECT rID FROM Rating WHERE stars != 4
Database: movie_1
Question: What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?
SQL: SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T3.name  =  'Brittany Harris' OR T2.year  >  2000
Database: movie_1
Question: What are the names of all movies that were made after 2000 or reviewed by Brittany Harris?
SQL: SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T3.name  =  'Brittany Harris' OR T2.year  >  2000
Database: movie_1
Question: What are names of the movies that are either made before 1980 or directed by James Cameron?
SQL: SELECT title FROM Movie WHERE director  =  "James Cameron" OR YEAR   <  1980
Database: movie_1
Question: What are the names of all movies made before 1980 or had James Cameron as the director?
SQL: SELECT title FROM Movie WHERE director  =  "James Cameron" OR YEAR   <  1980
Database: movie_1
Question: What are the names of reviewers who had rated 3 star and 4 star?
SQL: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  =  3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  =  4
Database: movie_1
Question: What are the names of all reviewers that have given 3 or 4 stars for reviews?
SQL: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  =  3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  =  4
Database: movie_1
Question: What are the names of movies that get 3 star and 4 star?
SQL: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  =  3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  =  4
Database: movie_1
Question: What are the names of all movies that received 3 or 4 stars?
SQL: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  =  3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  =  4
Database: county_public_safety
Question: How many counties are there?
SQL: SELECT count(*) FROM county_public_safety
Database: county_public_safety
Question: Count the number of countries.
SQL: SELECT count(*) FROM county_public_safety
Database: county_public_safety
Question: List the names of counties in descending order of population.
SQL: SELECT Name FROM county_public_safety ORDER BY Population DESC
Database: county_public_safety
Question: What are the names of the counties of public safety, ordered by population descending?
SQL: SELECT Name FROM county_public_safety ORDER BY Population DESC
Database: county_public_safety
Question: List the distinct police forces of counties whose location is not on east side.
SQL: SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION != "East"
Database: county_public_safety
Question: What are the different police forces of counties that are not located in the East?
SQL: SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION != "East"
Database: county_public_safety
Question: What are the minimum and maximum crime rate of counties?
SQL: SELECT min(Crime_rate) ,  max(Crime_rate) FROM county_public_safety
Database: county_public_safety
Question: Return the minimum and maximum crime rates across all counties.
SQL: SELECT min(Crime_rate) ,  max(Crime_rate) FROM county_public_safety
Database: county_public_safety
Question: Show the crime rates of counties in ascending order of number of police officers.
SQL: SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC
Database: county_public_safety
Question: What are the crime rates of counties sorted by number of offices ascending?
SQL: SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC
Database: county_public_safety
Question: What are the names of cities in ascending alphabetical order?
SQL: SELECT Name FROM city ORDER BY Name ASC
Database: county_public_safety
Question: Return the names of cities, ordered alphabetically.
SQL: SELECT Name FROM city ORDER BY Name ASC
Database: county_public_safety
Question: What are the percentage of hispanics in cities with the black percentage higher than 10?
SQL: SELECT Hispanic FROM city WHERE Black  >  10
Database: county_public_safety
Question: Return the hispanic percentage for cities in which the black percentage is greater than 10.
SQL: SELECT Hispanic FROM city WHERE Black  >  10
Database: county_public_safety
Question: List the name of the county with the largest population.
SQL: SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1
Database: county_public_safety
Question: What is the name of the county with the greatest population?
SQL: SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1
Database: county_public_safety
Question: List the names of the city with the top 5 white percentages.
SQL: SELECT Name FROM city ORDER BY White DESC LIMIT 5
Database: county_public_safety
Question: What are the names of the five cities with the greatest proportion of white people?
SQL: SELECT Name FROM city ORDER BY White DESC LIMIT 5
Database: county_public_safety
Question: Show names of cities and names of counties they are in.
SQL: SELECT T1.Name ,  T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID  =  T2.County_ID
Database: county_public_safety
Question: What are the names of cities, as well as the names of the counties they correspond to?
SQL: SELECT T1.Name ,  T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID  =  T2.County_ID
Database: county_public_safety
Question: Show white percentages of cities and the crime rates of counties they are in.
SQL: SELECT T1.White ,  T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID  =  T2.County_ID
Database: county_public_safety
Question: What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?
SQL: SELECT T1.White ,  T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID  =  T2.County_ID
Database: county_public_safety
Question: Show the name of cities in the county that has the largest number of police officers.
SQL: SELECT name FROM city WHERE county_ID  =  (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)
Database: county_public_safety
Question: What are the names of cities that are in the county with the most police officers?
SQL: SELECT name FROM city WHERE county_ID  =  (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)
Database: county_public_safety
Question: Show the number of cities in counties that have a population more than 20000.
SQL: SELECT count(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population  >  20000)
Database: county_public_safety
Question: How many cities are in counties that have populations of over 20000?
SQL: SELECT count(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population  >  20000)
Database: county_public_safety
Question: Show the crime rate of counties with a city having white percentage more than 90.
SQL: SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID  =  T2.County_ID WHERE T1.White  >  90
Database: county_public_safety
Question: What are the crime rates of counties that contain cities that have white percentages of over 90?
SQL: SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID  =  T2.County_ID WHERE T1.White  >  90
Database: county_public_safety
Question: Please show the police forces and the number of counties with each police force.
SQL: SELECT Police_force ,  COUNT(*) FROM county_public_safety GROUP BY Police_force
Database: county_public_safety
Question: How many counties correspond to each police force?
SQL: SELECT Police_force ,  COUNT(*) FROM county_public_safety GROUP BY Police_force
Database: county_public_safety
Question: What is the location shared by most counties?
SQL: SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1
Database: county_public_safety
Question: Which location has the most corresponding counties?
SQL: SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1
Database: county_public_safety
Question: List the names of counties that do not have any cities.
SQL: SELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city)
Database: county_public_safety
Question: What are the names of counties that do not contain any cities?
SQL: SELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city)
Database: county_public_safety
Question: Show the police force shared by counties with location on the east and west.
SQL: SELECT Police_force FROM county_public_safety WHERE LOCATION  =  "East" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION  =  "West"
Database: county_public_safety
Question: Which police forces operate in both counties that are located in the East and in the West?
SQL: SELECT Police_force FROM county_public_safety WHERE LOCATION  =  "East" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION  =  "West"
Database: county_public_safety
Question: Show the names of cities in counties that have a crime rate less than 100.
SQL: SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate  <  100)
Database: county_public_safety
Question: What are the names of cities that are in counties that have a crime rate below 100?
SQL: SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate  <  100)
Database: county_public_safety
Question: Show the case burden of counties in descending order of population.
SQL: SELECT Case_burden FROM county_public_safety ORDER BY Population DESC
Database: county_public_safety
Question: What are the case burdens of counties, ordered descending by population?
SQL: SELECT Case_burden FROM county_public_safety ORDER BY Population DESC
Database: inn_1
Question: Find the first and last names of people who payed more than the rooms' base prices.
SQL: SELECT T1.firstname ,  T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T1.Rate - T2.basePrice  >  0
Database: inn_1
Question: What are the first and last names of people who payed more than the rooms' base prices?
SQL: SELECT T1.firstname ,  T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T1.Rate - T2.basePrice  >  0
Database: inn_1
Question: Find the number of rooms that do not have any reservation.
SQL: SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)
Database: inn_1
Question: How many rooms have not had any reservation yet?
SQL: SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)
Database: inn_1
Question: Return the name and number of reservations made for each of the rooms.
SQL: SELECT T2.roomName ,  count(*) ,  T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room
Database: inn_1
Question: For each room, find its name and the number of times reservations were made for it.
SQL: SELECT T2.roomName ,  count(*) ,  T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room
Database: inn_1
Question: Find the names of rooms that have been reserved for more than 60 times.
SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room HAVING count(*)  >  60
Database: inn_1
Question: What are the names of rooms whose reservation frequency exceeds 60 times?
SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room HAVING count(*)  >  60
Database: inn_1
Question: Find the name of rooms whose base price is between 120 and 150.
SQL: SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150
Database: inn_1
Question: Which rooms cost between 120 and 150? Give me the room names.
SQL: SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150
Database: inn_1
Question: Find the name of rooms booked by some customers whose first name contains ROY.
SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE firstname LIKE '%ROY%'
Database: inn_1
Question: What are the name of rooms booked by customers whose first name has "ROY" in part?
SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE firstname LIKE '%ROY%'
Database: local_govt_mdm
Question: what are the details of the cmi masters that have the cross reference code 'Tax'?
SQL: SELECT T1.cmi_details FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id  =  T2.master_customer_id WHERE T2.source_system_code  =  'Tax'
Database: local_govt_mdm
Question: What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code.
SQL: SELECT T1.cmi_cross_ref_id ,  T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING count(*)  >=  1
Database: local_govt_mdm
Question: How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n
SQL: SELECT T2.cmi_cross_ref_id ,  T2.master_customer_id ,  count(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id
Database: local_govt_mdm
Question: What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.
SQL: SELECT T1.source_system_code ,  T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id ORDER BY T2.council_tax_id
Database: local_govt_mdm
Question: Wat is the tax source system code and master customer id of the taxes related to each parking fine id?
SQL: SELECT T1.source_system_code ,  T1.master_customer_id ,  T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id
Database: local_govt_mdm
Question: What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?
SQL: SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id  =  T2.master_customer_id WHERE T3.cmi_details != 'Schmidt ,  Kertzmann and Lubowitz'
Database: local_govt_mdm
Question: What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?
SQL: SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id WHERE T2.source_system_code  =  'Electoral' OR T2.source_system_code  =  'Tax'
Database: local_govt_mdm
Question: How many different source system code for the cmi cross references are there?
SQL: SELECT count(DISTINCT source_system_code) FROM CMI_cross_references
Database: local_govt_mdm
Question: List all information about customer master index, and sort them by details in descending order.
SQL: SELECT * FROM customer_master_index ORDER BY cmi_details DESC
Database: local_govt_mdm
Question: List the council tax ids and their related cmi cross references of all the parking fines.
SQL: SELECT council_tax_id ,  cmi_cross_ref_id FROM parking_fines
Database: local_govt_mdm
Question: How many council taxes are collected for renting arrears ?
SQL: SELECT count(*) FROM rent_arrears
Database: local_govt_mdm
Question: What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?
SQL: SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id  =  T2.master_customer_id WHERE T1.cmi_details  =  'Gottlieb ,  Becker and Wyman'
Database: local_govt_mdm
Question: Which cmi cross reference id is not related to any parking taxes?
SQL: SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines
Database: local_govt_mdm
Question: Which distinct source system code includes the substring 'en'?
SQL: SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%'
Database: party_host
Question: How many parties are there?
SQL: SELECT count(*) FROM party
Database: party_host
Question: Count the number of parties.
SQL: SELECT count(*) FROM party
Database: party_host
Question: List the themes of parties in ascending order of number of hosts.
SQL: SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC
Database: party_host
Question: What are the themes of parties ordered by the number of hosts in ascending manner?
SQL: SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC
Database: party_host
Question: What are the themes and locations of parties?
SQL: SELECT Party_Theme ,  LOCATION FROM party
Database: party_host
Question: Give me the theme and location of each party.
SQL: SELECT Party_Theme ,  LOCATION FROM party
Database: party_host
Question: Show the first year and last year of parties with theme "Spring" or "Teqnology".
SQL: SELECT First_year ,  Last_year FROM party WHERE Party_Theme  =  "Spring" OR Party_Theme  =  "Teqnology"
Database: party_host
Question: What are the first year and last year of the parties whose theme is "Spring" or "Teqnology"?
SQL: SELECT First_year ,  Last_year FROM party WHERE Party_Theme  =  "Spring" OR Party_Theme  =  "Teqnology"
Database: party_host
Question: What is the average number of hosts for parties?
SQL: SELECT avg(Number_of_hosts) FROM party
Database: party_host
Question: Compute the average number of hosts for parties.
SQL: SELECT avg(Number_of_hosts) FROM party
Database: party_host
Question: What is the location of the party with the most hosts?
SQL: SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1
Database: party_host
Question: Which party had the most hosts? Give me the party location.
SQL: SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1
Database: party_host
Question: Show different nationalities along with the number of hosts of each nationality.
SQL: SELECT Nationality ,  COUNT(*) FROM HOST GROUP BY Nationality
Database: party_host
Question: How many hosts does each nationality have? List the nationality and the count.
SQL: SELECT Nationality ,  COUNT(*) FROM HOST GROUP BY Nationality
Database: party_host
Question: Show the most common nationality of hosts.
SQL: SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Database: party_host
Question: Which nationality has the most hosts?
SQL: SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Database: party_host
Question: Show the nations that have both hosts older than 45 and hosts younger than 35.
SQL: SELECT Nationality FROM HOST WHERE Age  >  45 INTERSECT SELECT Nationality FROM HOST WHERE Age  <  35
Database: party_host
Question: Which nations have both hosts of age above 45 and hosts of age below 35?
SQL: SELECT Nationality FROM HOST WHERE Age  >  45 INTERSECT SELECT Nationality FROM HOST WHERE Age  <  35
Database: party_host
Question: Show the themes of parties and the names of the party hosts.
SQL: SELECT T3.Party_Theme ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID
Database: party_host
Question: For each party, return its theme and the name of its host.
SQL: SELECT T3.Party_Theme ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID
Database: party_host
Question: Show the locations of parties and the names of the party hosts in ascending order of the age of the host.
SQL: SELECT T3.Location ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID ORDER BY T2.Age
Database: party_host
Question: For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.
SQL: SELECT T3.Location ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID ORDER BY T2.Age
Database: party_host
Question: Show the locations of parties with hosts older than 50.
SQL: SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID WHERE T2.Age  >  50
Database: party_host
Question: Which parties have hosts of age above 50? Give me the party locations.
SQL: SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID WHERE T2.Age  >  50
Database: party_host
Question: Show the host names for parties with number of hosts greater than 20.
SQL: SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID WHERE T3.Number_of_hosts  >  20
Database: party_host
Question: Which parties have more than 20 hosts? Give me the host names for these parties.
SQL: SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID WHERE T3.Number_of_hosts  >  20
Database: party_host
Question: Show the name and the nationality of the oldest host.
SQL: SELECT Name ,  Nationality FROM HOST ORDER BY Age DESC LIMIT 1
Database: party_host
Question: What are the name and the nationality of the host of the highest age?
SQL: SELECT Name ,  Nationality FROM HOST ORDER BY Age DESC LIMIT 1
Database: party_host
Question: List the names of hosts who did not serve as a host of any party in our record.
SQL: SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)
Database: party_host
Question: What are the names of hosts who did not host any party in our record?
SQL: SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)
Database: storm_record
Question: How many regions do we have?
SQL: SELECT count(*) FROM region
Database: storm_record
Question: Count the number of regions.
SQL: SELECT count(*) FROM region
Database: storm_record
Question: Show all region code and region name sorted by the codes.
SQL: SELECT region_code ,  region_name FROM region ORDER BY region_code
Database: storm_record
Question: What are the codes and names for all regions, sorted by codes?
SQL: SELECT region_code ,  region_name FROM region ORDER BY region_code
Database: storm_record
Question: List all region names in alphabetical order.
SQL: SELECT region_name FROM region ORDER BY region_name
Database: storm_record
Question: What are the names of the regions in alphabetical order?
SQL: SELECT region_name FROM region ORDER BY region_name
Database: storm_record
Question: Show names for all regions except for Denmark.
SQL: SELECT region_name FROM region WHERE region_name != 'Denmark'
Database: storm_record
Question: Return the names of all regions other than Denmark.
SQL: SELECT region_name FROM region WHERE region_name != 'Denmark'
Database: storm_record
Question: How many storms had death records?
SQL: SELECT count(*) FROM storm WHERE Number_Deaths  >  0
Database: storm_record
Question: Count the number of storms in which at least 1 person died.
SQL: SELECT count(*) FROM storm WHERE Number_Deaths  >  0
Database: storm_record
Question: List name, dates active, and number of deaths for all storms with at least 1 death.
SQL: SELECT name ,  dates_active ,  number_deaths FROM storm WHERE number_deaths  >=  1
Database: storm_record
Question: What are the names, dates active, and number of deaths for storms that had 1 or more death?
SQL: SELECT name ,  dates_active ,  number_deaths FROM storm WHERE number_deaths  >=  1
Database: storm_record
Question: Show the average and maximum damage for all storms with max speed higher than 1000.
SQL: SELECT avg(damage_millions_USD) ,  max(damage_millions_USD) FROM storm WHERE max_speed  >  1000
Database: storm_record
Question: What is the average and maximum damage in millions for storms that had a max speed over 1000?
SQL: SELECT avg(damage_millions_USD) ,  max(damage_millions_USD) FROM storm WHERE max_speed  >  1000
Database: storm_record
Question: What is the total number of deaths and damage for all storms with a max speed greater than the average?
SQL: SELECT sum(number_deaths) ,  sum(damage_millions_USD) FROM storm WHERE max_speed  >  (SELECT avg(max_speed) FROM storm)
Database: storm_record
Question: Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.
SQL: SELECT sum(number_deaths) ,  sum(damage_millions_USD) FROM storm WHERE max_speed  >  (SELECT avg(max_speed) FROM storm)
Database: storm_record
Question: List name and damage for all storms in a descending order of max speed.
SQL: SELECT name ,  damage_millions_USD FROM storm ORDER BY max_speed DESC
Database: storm_record
Question: What are the names and damage in millions for storms, ordered by their max speeds descending?
SQL: SELECT name ,  damage_millions_USD FROM storm ORDER BY max_speed DESC
Database: storm_record
Question: How many regions are affected?
SQL: SELECT count(DISTINCT region_id) FROM affected_region
Database: storm_record
Question: Count the number of different affected regions.
SQL: SELECT count(DISTINCT region_id) FROM affected_region
Database: storm_record
Question: Show the name for regions not affected.
SQL: SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region)
Database: storm_record
Question: What are the names of regions that were not affected?
SQL: SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region)
Database: storm_record
Question: Show the name for regions and the number of storms for each region.
SQL: SELECT T1.region_name ,  count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id
Database: storm_record
Question: How many storms occured in each region?
SQL: SELECT T1.region_name ,  count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id
Database: storm_record
Question: List the name for storms and the number of affected regions for each storm.
SQL: SELECT T1.name ,  count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id
Database: storm_record
Question: How many regions were affected by each storm?
SQL: SELECT T1.name ,  count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id
Database: storm_record
Question: What is the storm name and max speed which affected the greatest number of regions?
SQL: SELECT T1.name ,  T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1
Database: storm_record
Question: Return the name and max speed of the storm that affected the most regions.
SQL: SELECT T1.name ,  T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1
Database: storm_record
Question: Show the name of storms which don't have affected region in record.
SQL: SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)
Database: storm_record
Question: What are the names of storms that did not affect any regions?
SQL: SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)
Database: storm_record
Question: Show storm name with at least two regions and 10 cities affected.
SQL: SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING count(*)  >=  2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING sum(T2.number_city_affected)  >=  10
Database: storm_record
Question: What are the names of storms that both affected two or more regions and affected a total of 10 or more cities?
SQL: SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING count(*)  >=  2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING sum(T2.number_city_affected)  >=  10
Database: storm_record
Question: Show all storm names except for those with at least two affected regions.
SQL: SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING count(*)  >=  2
Database: storm_record
Question: What are the names of storms that did not affect two or more regions?
SQL: SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING count(*)  >=  2
Database: storm_record
Question: What are the region names affected by the storm with a number of deaths of least 10?
SQL: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T3.number_deaths  >=  10
Database: storm_record
Question: Return the names of the regions affected by storms that had a death count of at least 10.
SQL: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T3.number_deaths  >=  10
Database: storm_record
Question: Show all storm names affecting region "Denmark".
SQL: SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.region_name  =  'Denmark'
Database: storm_record
Question: What are the names of the storms that affected Denmark?
SQL: SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.region_name  =  'Denmark'
Database: storm_record
Question: Show the region name with at least two storms.
SQL: SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*)  >=  2
Database: storm_record
Question: What are the names of regions with two or more storms?
SQL: SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*)  >=  2
Database: storm_record
Question: Find the names of the regions which were affected by the storm that killed the greatest number of people.
SQL: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1
Database: storm_record
Question: What are the names of regions that were affected by the storm in which the most people died?
SQL: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1
Database: storm_record
Question: Find the name of the storm that affected both Afghanistan and Albania regions.
SQL: SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.Region_name  =  'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.Region_name  =  'Albania'
Database: storm_record
Question: What are the names of the storms that affected both the regions of Afghanistan and Albania?
SQL: SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.Region_name  =  'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.Region_name  =  'Albania'
Database: election
Question: How many counties are there in total?
SQL: SELECT count(*) FROM county
Database: election
Question: Count the total number of counties.
SQL: SELECT count(*) FROM county
Database: election
Question: Show the county name and population of all counties.
SQL: SELECT County_name ,  Population FROM county
Database: election
Question: What are the name and population of each county?
SQL: SELECT County_name ,  Population FROM county
Database: election
Question: Show the average population of all counties.
SQL: SELECT avg(Population) FROM county
Database: election
Question: On average how large is the population of the counties?
SQL: SELECT avg(Population) FROM county
Database: election
Question: Return the maximum and minimum population among all counties.
SQL: SELECT max(Population) ,  min(Population) FROM county
Database: election
Question: What are the maximum and minimum population of the counties?
SQL: SELECT max(Population) ,  min(Population) FROM county
Database: election
Question: Show all the distinct districts for elections.
SQL: SELECT DISTINCT District FROM election
Database: election
Question: What are the distinct districts for elections?
SQL: SELECT DISTINCT District FROM election
Database: election
Question: Show the zip code of the county with name "Howard".
SQL: SELECT Zip_code FROM county WHERE County_name  =  "Howard"
Database: election
Question: What is the zip code the county named "Howard" is located in?
SQL: SELECT Zip_code FROM county WHERE County_name  =  "Howard"
Database: election
Question: Show the delegate from district 1 in election.
SQL: SELECT Delegate FROM election WHERE District  =  1
Database: election
Question: Who is the delegate of district 1 in the elections?
SQL: SELECT Delegate FROM election WHERE District  =  1
Database: election
Question: Show the delegate and committee information of elections.
SQL: SELECT Delegate ,  Committee FROM election
Database: election
Question: What are the delegate and committee information for each election record?
SQL: SELECT Delegate ,  Committee FROM election
Database: election
Question: How many distinct governors are there?
SQL: SELECT count(DISTINCT Governor) FROM party
Database: election
Question: Count the number of distinct governors.
SQL: SELECT count(DISTINCT Governor) FROM party