cnatale/presto-athena-txt-2-sql huggingface dataset:
What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?
Additional table information: table: csu_1
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')
What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?
Additional table information: table: csu_1
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
What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?
Additional table information: table: csu_1
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
How many campuses are there in Los Angeles county?
Additional table information: table: csu_1
SQL: SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles'
How many campuses exist are in the county of LA?
Additional table information: table: csu_1
SQL: SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles'
List the campuses in Los Angeles county.
Additional table information: table: csu_1
SQL: SELECT campus FROM campuses WHERE county = 'Los Angeles'
What campuses are in Los Angeles county?
Additional table information: table: csu_1
SQL: SELECT campus FROM campuses WHERE county = 'Los Angeles'
How many degrees were conferred in 'San Jose State University' in 2000?
Additional table information: table: csu_1
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
How many degrees were conferred at San Jose State University in 2000?
Additional table information: table: csu_1
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
What are the degrees conferred in 'San Francisco State University' in 2001.
Additional table information: table: csu_1
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
What degrees were conferred in San Francisco State University in the year 2001?
Additional table information: table: csu_1
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
How many faculty is there in total in the year of 2002?
Additional table information: table: csu_1
SQL: SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002
How many faculty, in total, are there in the year 2002?
Additional table information: table: csu_1
SQL: SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002
What is the number of faculty lines in campus 'Long Beach State University' in 2002?
Additional table information: table: csu_1
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'
What is the number of faculty at Long Beach State University in 2002?
Additional table information: table: csu_1
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'
How many faculty lines are there in 'San Francisco State University' in year 2004?
Additional table information: table: csu_1
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'
How many faculty lines are there at San Francisco State University in 2004?
Additional table information: table: csu_1
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'
List the campus that have between 600 and 1000 faculty lines in year 2004.
Additional table information: table: csu_1
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
What are the campuses that had between 600 and 1000 faculty members in 2004?
Additional table information: table: csu_1
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
How many faculty lines are there in the university that conferred the most number of degrees in year 2002?
Additional table information: table: csu_1
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
How many faculty members did the university that conferred the most degrees in 2002 have?
Additional table information: table: csu_1
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
How many faculty lines are there in the university that conferred the least number of degrees in year 2001?
Additional table information: table: csu_1
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 NULLS FIRST LIMIT 1
How many faculty members are at the university that gave the least number of degrees in 2001?
Additional table information: table: csu_1
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 NULLS FIRST LIMIT 1
How many undergraduates are there in 'San Jose State University' in year 2004?
Additional table information: table: csu_1
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'
How many undergraduates are there at San Jose State
Additional table information: table: csu_1
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'
What is the number of graduates in 'San Francisco State University' in year 2004?
Additional table information: table: csu_1
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'
How many people graduated from San Francisco State University in 2004?
Additional table information: table: csu_1
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'
What is the campus fee of 'San Francisco State University' in year 2000?
Additional table information: table: csu_1
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
In the year 2000, what is the campus fee for San Francisco State University?
Additional table information: table: csu_1
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
Find the campus fee of 'San Jose State University' in year 2000.
Additional table information: table: csu_1
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
What is the campus fee in the year 2000 for San Jose State University?
Additional table information: table: csu_1
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
How many CSU campuses are there?
Additional table information: table: csu_1
SQL: SELECT COUNT(*) FROM campuses
What is the total number of campuses?
Additional table information: table: csu_1
SQL: SELECT COUNT(*) FROM campuses
How many candidates are there?
Additional table information: table: candidate_poll
SQL: SELECT COUNT(*) FROM candidate
Count the number of candidates.
Additional table information: table: candidate_poll
SQL: SELECT COUNT(*) FROM candidate
Which poll resource provided the most number of candidate information?
Additional table information: table: candidate_poll
SQL: SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1
Return the poll resource associated with the most candidates.
Additional table information: table: candidate_poll
SQL: SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1
what are the top 3 highest support rates?
Additional table information: table: candidate_poll
SQL: SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3
Return the top 3 greatest support rates.
Additional table information: table: candidate_poll
SQL: SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3
Find the id of the candidate who got the lowest oppose rate.
Additional table information: table: candidate_poll
SQL: SELECT Candidate_ID FROM candidate ORDER BY oppose_rate NULLS FIRST LIMIT 1
What is the id of the candidate with the lowest oppose rate?
Additional table information: table: candidate_poll
SQL: SELECT Candidate_ID FROM candidate ORDER BY oppose_rate NULLS FIRST LIMIT 1
Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.
Additional table information: table: candidate_poll
SQL: SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate NULLS FIRST
What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?
Additional table information: table: candidate_poll
SQL: SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate NULLS FIRST
which poll source does the highest oppose rate come from?
Additional table information: table: candidate_poll
SQL: SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1
Return the poll source corresponding to the candidate who has the oppose rate.
Additional table information: table: candidate_poll
SQL: SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1
List all people names in the order of their date of birth from old to young.
Additional table information: table: candidate_poll
SQL: SELECT name FROM people ORDER BY date_of_birth NULLS FIRST
What are the names of all people, ordered by their date of birth?
Additional table information: table: candidate_poll
SQL: SELECT name FROM people ORDER BY date_of_birth NULLS FIRST
Find the average height and weight for all males (sex is M).
Additional table information: table: candidate_poll
SQL: SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M'
What are the average height and weight across males (sex is M)?
Additional table information: table: candidate_poll
SQL: SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M'
find the names of people who are taller than 200 or lower than 190.
Additional table information: table: candidate_poll
SQL: SELECT name FROM people WHERE height > 200 OR height < 190
What are the names of people who have a height greater than 200 or less than 190?
Additional table information: table: candidate_poll
SQL: SELECT name FROM people WHERE height > 200 OR height < 190
Find the average and minimum weight for each gender.
Additional table information: table: candidate_poll
SQL: SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex
What are the average and minimum weights for people of each sex?
Additional table information: table: candidate_poll
SQL: SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex
Find the name and gender of the candidate who got the highest support rate.
Additional table information: table: candidate_poll
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
What is the name and sex of the candidate with the highest support rate?
Additional table information: table: candidate_poll
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
Find the name of the candidates whose oppose percentage is the lowest for each sex.
Additional table information: table: candidate_poll
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
For each sex, what is the name and sex of the candidate with the oppose rate for their sex?
Additional table information: table: candidate_poll
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
which gender got the highest average uncertain ratio.
Additional table information: table: candidate_poll
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
What is the sex of the candidate who had the highest unsure rate?
Additional table information: table: candidate_poll
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
what are the names of people who did not participate in the candidate election.
Additional table information: table: candidate_poll
SQL: SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate)
Give the names of people who did not participate in the candidate election.
Additional table information: table: candidate_poll
SQL: SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate)
Find the names of the candidates whose support percentage is lower than their oppose rate.
Additional table information: table: candidate_poll
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
What are the names of candidates who have a lower support rate than oppose rate?
Additional table information: table: candidate_poll
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
how many people are there whose weight is higher than 85 for each gender?
Additional table information: table: candidate_poll
SQL: SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex
Count the number of people of each sex who have a weight higher than 85.
Additional table information: table: candidate_poll
SQL: SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex
find the highest support percentage, lowest consider rate and oppose rate of all candidates.
Additional table information: table: candidate_poll
SQL: SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate
Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?
Additional table information: table: candidate_poll
SQL: SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate
list all female (sex is F) candidate names in the alphabetical order.
Additional table information: table: candidate_poll
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 NULLS FIRST
What are the names of all female candidates in alphabetical order (sex is F)?
Additional table information: table: candidate_poll
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 NULLS FIRST
find the name of people whose height is lower than the average.
Additional table information: table: candidate_poll
SQL: SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people)
What are the names of people who are shorter than average?
Additional table information: table: candidate_poll
SQL: SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people)
List all info about all people.
Additional table information: table: candidate_poll
SQL: SELECT * FROM people
What is all the information about all people?
Additional table information: table: candidate_poll
SQL: SELECT * FROM people
Find the titles of all movies directed by steven spielberg.
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE director = 'Steven Spielberg'
What are the names of all movies directed by Steven Spielberg?
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE director = 'Steven Spielberg'
What is the name of the movie produced after 2000 and directed by James Cameron?
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000
What are the titles of all movies that James Cameron directed after 2000?
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000
How many movies were made before 2000?
Additional table information: table: movie_1
SQL: SELECT COUNT(*) FROM Movie WHERE YEAR < 2000
Who is the director of movie Avatar?
Additional table information: table: movie_1
SQL: SELECT director FROM Movie WHERE title = 'Avatar'
Who directed Avatar?
Additional table information: table: movie_1
SQL: SELECT director FROM Movie WHERE title = 'Avatar'
How many reviewers listed?
Additional table information: table: movie_1
SQL: SELECT COUNT(*) FROM Reviewer
How many reviewers are there?
Additional table information: table: movie_1
SQL: SELECT COUNT(*) FROM Reviewer
What is the id of the reviewer whose name has substring “Mike”?
Additional table information: table: movie_1
SQL: SELECT rID FROM Reviewer WHERE name LIKE '%Mike%'
What is the id of the reviewer whose name includes the word 'Mike'?
Additional table information: table: movie_1
SQL: SELECT rID FROM Reviewer WHERE name LIKE '%Mike%'
What is the reviewer id of Daniel Lewis?
Additional table information: table: movie_1
SQL: SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis'
What is the id of the reviewer named Daniel Lewis?
Additional table information: table: movie_1
SQL: SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis'
What is the total number of ratings that has more than 3 stars?
Additional table information: table: movie_1
SQL: SELECT COUNT(*) FROM Rating WHERE stars > 3
How many movie ratings have more than 3 stars?
Additional table information: table: movie_1
SQL: SELECT COUNT(*) FROM Rating WHERE stars > 3
What is the lowest and highest rating star?
Additional table information: table: movie_1
SQL: SELECT MAX(stars), MIN(stars) FROM Rating
What is the maximum and mininum number of stars a rating can receive?
Additional table information: table: movie_1
SQL: SELECT MAX(stars), MIN(stars) FROM Rating
Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.
Additional table information: table: movie_1
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 NULLS FIRST
In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently?
Additional table information: table: movie_1
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 NULLS FIRST
What are the names of directors who directed movies with 5 star rating? Also return the title of these movies.
Additional table information: table: movie_1
SQL: SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5
What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?
Additional table information: table: movie_1
SQL: SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5
What is the average rating star for each reviewer?
Additional table information: table: movie_1
SQL: SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name
What is the average number of stars that each reviewer awards for a movie?
Additional table information: table: movie_1
SQL: SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name
Find the titles of all movies that have no ratings.
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating)
What are the titles of all movies that have not been rated?
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating)
Find the names of all reviewers who have ratings with a NULL value for the date.
Additional table information: table: movie_1
SQL: SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = 'null'
What are the different names of all reviewers whose ratings do not have a date field?
Additional table information: table: movie_1
SQL: SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = 'null'
What is the average rating stars and title for the oldest movie?
Additional table information: table: movie_1
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)
For the oldest movie listed, what is its average rating and title?
Additional table information: table: movie_1
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)
What is the name of the most recent movie?
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie)
What is the title of the newest movie?
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie)
What is the maximum stars and year for the most recent movie?
Additional table information: table: movie_1
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)
What is highest rating for the most recent movie and when was it released?
Additional table information: table: movie_1
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)
What is the names of movies whose created year is after all movies directed by Steven Spielberg?
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg')
What are the names of all movies that were created after the most recent Steven Spielberg film?
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg')
What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?
Additional table information: table: movie_1
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')
What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?
Additional table information: table: movie_1
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')
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.
Additional table information: table: movie_1
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 NULLS FIRST, T2.title NULLS FIRST, T1.stars NULLS FIRST
What is the reviewer name, film title, movie rating, and rating date  for every movie ordered by reviewer name, movie title, then finally rating?
Additional table information: table: movie_1
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 NULLS FIRST, T2.title NULLS FIRST, T1.stars NULLS FIRST
Find the names of all reviewers who have contributed three or more ratings.
Additional table information: table: movie_1
SQL: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3
What are the names of all reviewers that have rated 3 or more movies?
Additional table information: table: movie_1
SQL: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3
Find the names of all reviewers who rated Gone with the Wind.
Additional table information: table: movie_1
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'
What are the names of all the different reviewers who rates Gone with the Wind?
Additional table information: table: movie_1
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'
Find the names of all directors whose movies are rated by Sarah Martinez.
Additional table information: table: movie_1
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'
What are the names of all directors whose movies have been reviewed by Sarah Martinez?
Additional table information: table: movie_1
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'
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.
Additional table information: table: movie_1
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
What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?
Additional table information: table: movie_1
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
Return all reviewer names and movie names together in a single list.
Additional table information: table: movie_1
SQL: SELECT name FROM Reviewer UNION SELECT title FROM Movie
What are the names of all the reviewers and movie names?
Additional table information: table: movie_1
SQL: SELECT name FROM Reviewer UNION SELECT title FROM Movie
Find the titles of all movies not reviewed by Chris Jackson.
Additional table information: table: movie_1
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'
What are the titles of all movies that were not reviewed by Chris Jackson?
Additional table information: table: movie_1
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'
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.
Additional table information: table: movie_1
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 NULLS FIRST, T1.title NULLS FIRST
For all directors who have directed more than one movie, what movies have they directed and what are their names?
Additional table information: table: movie_1
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 NULLS FIRST, T1.title NULLS FIRST
For directors who had more than one movie, return the titles and produced years of all movies directed by them.
Additional table information: table: movie_1
SQL: SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title
For each director who directed more than one movie, what are the titles and dates of release for all those movies?
Additional table information: table: movie_1
SQL: SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title
What are the names of the directors who made exactly one movie?
Additional table information: table: movie_1
SQL: SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1
What are the names of all directors who made one movie?
Additional table information: table: movie_1
SQL: SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1
What are the names of the directors who made exactly one movie excluding director NULL?
Additional table information: table: movie_1
SQL: SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1
What are the names of all directors who have made one movie except for the director named NULL?
Additional table information: table: movie_1
SQL: SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1
How many movie reviews does each director get?
Additional table information: table: movie_1
SQL: SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director
For each director, how many reviews have they received?
Additional table information: table: movie_1
SQL: SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director
Find the movies with the highest average rating. Return the movie titles and average rating.
Additional table information: table: movie_1
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
What are the movie titles with the highest average rating and what are those ratings?
Additional table information: table: movie_1
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
What are the movie titles and average rating of the movies with the lowest average rating?
Additional table information: table: movie_1
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) NULLS FIRST LIMIT 1
What are the titles and average ratings for all movies that have the lowest average rating?
Additional table information: table: movie_1
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) NULLS FIRST LIMIT 1
What are the names and years of the movies that has the top 3 highest rating star?
Additional table information: table: movie_1
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
What are the names and years released for the movies with the top 3 highest ratings?
Additional table information: table: movie_1
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
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.
Additional table information: table: movie_1
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
For each director, what are the titles and ratings for all the movies they reviewed?
Additional table information: table: movie_1
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
Find the title and star rating of the movie that got the least rating star for each reviewer.
Additional table information: table: movie_1
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
For each reviewer id, what is the title and rating for the movie with the smallest rating?
Additional table information: table: movie_1
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
Find the title and score of the movie with the lowest rating among all movies directed by each director.
Additional table information: table: movie_1
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
For each director, what is the title and score of their most poorly rated movie?
Additional table information: table: movie_1
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
What is the name of the movie that is rated by most of times?
Additional table information: table: movie_1
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
What is the name of the movie that has been reviewed the most?
Additional table information: table: movie_1
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
What are the titles of all movies that have rating star is between 3 and 5?
Additional table information: table: movie_1
SQL: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5
What are the titles of all movies that have between 3 and 5 stars?
Additional table information: table: movie_1
SQL: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5
Find the names of reviewers who had given higher than 3 star ratings.
Additional table information: table: movie_1
SQL: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3
What are the names of the reviewers who have rated a movie more than 3 stars before?
Additional table information: table: movie_1
SQL: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3
Find the average rating star for each movie that are not reviewed by Brittany Harris.
Additional table information: table: movie_1
SQL: SELECT mID, AVG(stars) FROM Rating WHERE NOT mID 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
What is the average rating for each movie that has never been reviewed by Brittany Harris?
Additional table information: table: movie_1
SQL: SELECT mID, AVG(stars) FROM Rating WHERE NOT mID 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
What are the ids of the movies that are not reviewed by Brittany Harris.
Additional table information: table: movie_1
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'
What are the ids of all moviest hat have not been reviewed by Britanny Harris?
Additional table information: table: movie_1
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'
Find the average rating star for each movie that received at least 2 ratings.
Additional table information: table: movie_1
SQL: SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2
For each movie that received more than 3 reviews, what is the average rating?
Additional table information: table: movie_1
SQL: SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2
find the ids of reviewers who did not give 4 star.
Additional table information: table: movie_1
SQL: SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4
What are the ids of all reviewers who did not give 4 stars?
Additional table information: table: movie_1
SQL: SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4
Find the ids of reviewers who didn't only give 4 star.
Additional table information: table: movie_1
SQL: SELECT rID FROM Rating WHERE stars <> 4
What are the ids of all reviewers who have not given 4 stars at least once?
Additional table information: table: movie_1
SQL: SELECT rID FROM Rating WHERE stars <> 4
What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?
Additional table information: table: movie_1
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
What are the names of all movies that were made after 2000 or reviewed by Brittany Harris?
Additional table information: table: movie_1
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
What are names of the movies that are either made before 1980 or directed by James Cameron?
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980
What are the names of all movies made before 1980 or had James Cameron as the director?
Additional table information: table: movie_1
SQL: SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980
What are the names of reviewers who had rated 3 star and 4 star?
Additional table information: table: movie_1
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
What are the names of all reviewers that have given 3 or 4 stars for reviews?
Additional table information: table: movie_1
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
What are the names of movies that get 3 star and 4 star?
Additional table information: table: movie_1
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
What are the names of all movies that received 3 or 4 stars?
Additional table information: table: movie_1
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
How many counties are there?
Additional table information: table: county_public_safety
SQL: SELECT COUNT(*) FROM county_public_safety
Count the number of countries.
Additional table information: table: county_public_safety
SQL: SELECT COUNT(*) FROM county_public_safety
List the names of counties in descending order of population.
Additional table information: table: county_public_safety
SQL: SELECT Name FROM county_public_safety ORDER BY Population DESC
What are the names of the counties of public safety, ordered by population descending?
Additional table information: table: county_public_safety
SQL: SELECT Name FROM county_public_safety ORDER BY Population DESC
List the distinct police forces of counties whose location is not on east side.
Additional table information: table: county_public_safety
SQL: SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East'
What are the different police forces of counties that are not located in the East?
Additional table information: table: county_public_safety
SQL: SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East'
What are the minimum and maximum crime rate of counties?
Additional table information: table: county_public_safety
SQL: SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety
Return the minimum and maximum crime rates across all counties.
Additional table information: table: county_public_safety
SQL: SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety
Show the crime rates of counties in ascending order of number of police officers.
Additional table information: table: county_public_safety
SQL: SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC NULLS FIRST
What are the crime rates of counties sorted by number of offices ascending?
Additional table information: table: county_public_safety
SQL: SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC NULLS FIRST
What are the names of cities in ascending alphabetical order?
Additional table information: table: county_public_safety
SQL: SELECT Name FROM city ORDER BY Name ASC NULLS FIRST
Return the names of cities, ordered alphabetically.
Additional table information: table: county_public_safety
SQL: SELECT Name FROM city ORDER BY Name ASC NULLS FIRST
What are the percentage of hispanics in cities with the black percentage higher than 10?
Additional table information: table: county_public_safety
SQL: SELECT Hispanic FROM city WHERE Black > 10
Return the hispanic percentage for cities in which the black percentage is greater than 10.
Additional table information: table: county_public_safety
SQL: SELECT Hispanic FROM city WHERE Black > 10
List the name of the county with the largest population.
Additional table information: table: county_public_safety
SQL: SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1
What is the name of the county with the greatest population?
Additional table information: table: county_public_safety
SQL: SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1
List the names of the city with the top 5 white percentages.
Additional table information: table: county_public_safety
SQL: SELECT Name FROM city ORDER BY White DESC LIMIT 5
What are the names of the five cities with the greatest proportion of white people?
Additional table information: table: county_public_safety
SQL: SELECT Name FROM city ORDER BY White DESC LIMIT 5
Show names of cities and names of counties they are in.
Additional table information: table: county_public_safety
SQL: SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID
What are the names of cities, as well as the names of the counties they correspond to?
Additional table information: table: county_public_safety
SQL: SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID
Show white percentages of cities and the crime rates of counties they are in.
Additional table information: table: county_public_safety
SQL: SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID
What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?
Additional table information: table: county_public_safety
SQL: SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID
Show the name of cities in the county that has the largest number of police officers.
Additional table information: table: county_public_safety
SQL: SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)
What are the names of cities that are in the county with the most police officers?
Additional table information: table: county_public_safety
SQL: SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)
Show the number of cities in counties that have a population more than 20000.
Additional table information: table: county_public_safety
SQL: SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)
How many cities are in counties that have populations of over 20000?
Additional table information: table: county_public_safety
SQL: SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)
Show the crime rate of counties with a city having white percentage more than 90.
Additional table information: table: county_public_safety
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
What are the crime rates of counties that contain cities that have white percentages of over 90?
Additional table information: table: county_public_safety
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
Please show the police forces and the number of counties with each police force.
Additional table information: table: county_public_safety
SQL: SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force
How many counties correspond to each police force?
Additional table information: table: county_public_safety
SQL: SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force
What is the location shared by most counties?
Additional table information: table: county_public_safety
SQL: SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1
Which location has the most corresponding counties?
Additional table information: table: county_public_safety
SQL: SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1
List the names of counties that do not have any cities.
Additional table information: table: county_public_safety
SQL: SELECT Name FROM county_public_safety WHERE NOT County_ID IN (SELECT County_ID FROM city)
What are the names of counties that do not contain any cities?
Additional table information: table: county_public_safety
SQL: SELECT Name FROM county_public_safety WHERE NOT County_ID IN (SELECT County_ID FROM city)
Show the police force shared by counties with location on the east and west.
Additional table information: table: county_public_safety
SQL: SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West'
Which police forces operate in both counties that are located in the East and in the West?
Additional table information: table: county_public_safety
SQL: SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West'
Show the names of cities in counties that have a crime rate less than 100.
Additional table information: table: county_public_safety
SQL: SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)
What are the names of cities that are in counties that have a crime rate below 100?
Additional table information: table: county_public_safety
SQL: SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)
Show the case burden of counties in descending order of population.
Additional table information: table: county_public_safety
SQL: SELECT Case_burden FROM county_public_safety ORDER BY Population DESC
What are the case burdens of counties, ordered descending by population?
Additional table information: table: county_public_safety
SQL: SELECT Case_burden FROM county_public_safety ORDER BY Population DESC
Find the names of all modern rooms with a base price below $160 and two beds.
Additional table information: table: inn_1
SQL: SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern'