Unnamed: 0
int64 0
60k
| input
stringlengths 76
562
| answer
stringlengths 18
557
|
---|---|---|
1,400 | <question>: In which year did the most recent crime happen? <context>: CREATE TABLE perpetrator (YEAR INTEGER) | SELECT MAX(YEAR) FROM perpetrator |
1,401 | <question>: Report the name of all campuses in Los Angeles county. <context>: CREATE TABLE campuses (campus VARCHAR, county VARCHAR) | SELECT campus FROM campuses WHERE county = "Los Angeles" |
1,402 | <question>: What are the names of all campuses located at Chico? <context>: CREATE TABLE campuses (campus VARCHAR, LOCATION VARCHAR) | SELECT campus FROM campuses WHERE LOCATION = "Chico" |
1,403 | <question>: Find all the campuses opened in 1958. <context>: CREATE TABLE campuses (campus VARCHAR, YEAR VARCHAR) | SELECT campus FROM campuses WHERE YEAR = 1958 |
1,404 | <question>: Find the name of the campuses opened before 1800. <context>: CREATE TABLE campuses (campus VARCHAR, YEAR INTEGER) | SELECT campus FROM campuses WHERE YEAR < 1800 |
1,405 | <question>: Which campus was opened between 1935 and 1939? <context>: CREATE TABLE campuses (campus VARCHAR, YEAR VARCHAR) | SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939 |
1,406 | <question>: Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco. <context>: CREATE TABLE campuses (campus VARCHAR, LOCATION VARCHAR, county VARCHAR) | SELECT campus FROM campuses WHERE LOCATION = "Northridge" AND county = "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION = "San Francisco" AND county = "San Francisco" |
1,407 | <question>: What is the campus fee of "San Jose State University" in year 1996? <context>: CREATE TABLE csu_fees (year VARCHAR); CREATE TABLE campuses (id VARCHAR) | SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = "San Jose State University" AND T2.year = 1996 |
1,408 | <question>: What is the campus fee of "San Francisco State University" in year 1996? <context>: CREATE TABLE csu_fees (year VARCHAR); CREATE TABLE campuses (id VARCHAR) | SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND T2.year = 1996 |
1,409 | <question>: Find the count of universities whose campus fee is greater than the average campus fee. <context>: CREATE TABLE csu_fees (campusfee INTEGER) | SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees) |
1,410 | <question>: Which university is in Los Angeles county and opened after 1950? <context>: CREATE TABLE campuses (campus VARCHAR, county VARCHAR, YEAR VARCHAR) | SELECT campus FROM campuses WHERE county = "Los Angeles" AND YEAR > 1950 |
1,411 | <question>: Which year has the most degrees conferred? <context>: CREATE TABLE degrees (YEAR VARCHAR, degrees INTEGER) | SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1 |
1,412 | <question>: Which campus has the most degrees conferred in all times? <context>: CREATE TABLE degrees (campus VARCHAR, degrees INTEGER) | SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1 |
1,413 | <question>: Which campus has the most faculties in year 2003? <context>: CREATE TABLE faculty (campus VARCHAR, year VARCHAR, faculty VARCHAR); CREATE TABLE campuses (campus VARCHAR, id VARCHAR) | SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1 |
1,414 | <question>: Find the average fee on a CSU campus in 1996 <context>: CREATE TABLE csu_fees (campusfee INTEGER, YEAR VARCHAR) | SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996 |
1,415 | <question>: What is the average fee on a CSU campus in 2005? <context>: CREATE TABLE csu_fees (campusfee INTEGER, YEAR VARCHAR) | SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005 |
1,416 | <question>: report the total number of degrees granted between 1998 and 2002. <context>: CREATE TABLE campuses (campus VARCHAR, id VARCHAR); CREATE TABLE degrees (degrees INTEGER, campus VARCHAR, year VARCHAR) | SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus |
1,417 | <question>: For each Orange county campus, report the number of degrees granted after 2000. <context>: CREATE TABLE campuses (campus VARCHAR, id VARCHAR, county VARCHAR); CREATE TABLE degrees (degrees INTEGER, campus VARCHAR, year VARCHAR) | SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = "Orange" AND T2.year >= 2000 GROUP BY T1.campus |
1,418 | <question>: Find the names of the campus which has more faculties in 2002 than every campus in Orange county. <context>: CREATE TABLE campuses (campus VARCHAR, id VARCHAR, county VARCHAR); CREATE TABLE faculty (campus VARCHAR, year VARCHAR) | 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") |
1,419 | <question>: What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956? <context>: CREATE TABLE enrollments (campus VARCHAR, year VARCHAR); CREATE TABLE campuses (id VARCHAR) | 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 |
1,420 | <question>: How many campuses are there in Los Angeles county? <context>: CREATE TABLE campuses (county VARCHAR) | SELECT COUNT(*) FROM campuses WHERE county = "Los Angeles" |
1,421 | <question>: How many degrees were conferred in "San Jose State University" in 2000? <context>: CREATE TABLE degrees (Id VARCHAR); CREATE TABLE campuses (Id VARCHAR) | 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 |
1,422 | <question>: What are the degrees conferred in "San Francisco State University" in 2001. <context>: CREATE TABLE degrees (Id VARCHAR); CREATE TABLE campuses (Id VARCHAR) | 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 |
1,423 | <question>: How many faculty is there in total in the year of 2002? <context>: CREATE TABLE faculty (faculty INTEGER, YEAR VARCHAR) | SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002 |
1,424 | <question>: What is the number of faculty lines in campus "Long Beach State University" in 2002? <context>: CREATE TABLE campuses (id VARCHAR, campus VARCHAR); CREATE TABLE faculty (campus VARCHAR, year VARCHAR) | 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" |
1,425 | <question>: How many faculty lines are there in "San Francisco State University" in year 2004? <context>: CREATE TABLE campuses (id VARCHAR, campus VARCHAR); CREATE TABLE faculty (campus VARCHAR, year VARCHAR) | 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" |
1,426 | <question>: List the campus that have between 600 and 1000 faculty lines in year 2004. <context>: CREATE TABLE campuses (id VARCHAR); CREATE TABLE faculty (campus VARCHAR, faculty VARCHAR) | 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 |
1,427 | <question>: How many faculty lines are there in the university that conferred the most number of degrees in year 2002? <context>: CREATE TABLE campuses (id VARCHAR); CREATE TABLE faculty (faculty VARCHAR); CREATE TABLE degrees (Id VARCHAR) | 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 |
1,428 | <question>: How many faculty lines are there in the university that conferred the least number of degrees in year 2001? <context>: CREATE TABLE campuses (id VARCHAR); CREATE TABLE faculty (faculty VARCHAR); CREATE TABLE degrees (Id VARCHAR) | SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees LIMIT 1 |
1,429 | <question>: How many undergraduates are there in "San Jose State University" in year 2004? <context>: CREATE TABLE discipline_enrollments (undergraduate INTEGER, campus VARCHAR, year VARCHAR); CREATE TABLE campuses (id VARCHAR, campus VARCHAR) | 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" |
1,430 | <question>: What is the number of graduates in "San Francisco State University" in year 2004? <context>: CREATE TABLE discipline_enrollments (graduate INTEGER, campus VARCHAR, year VARCHAR); CREATE TABLE campuses (id VARCHAR, campus VARCHAR) | 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" |
1,431 | <question>: What is the campus fee of "San Francisco State University" in year 2000? <context>: CREATE TABLE campuses (id VARCHAR, campus VARCHAR); CREATE TABLE csu_fees (campusfee VARCHAR, campus VARCHAR, year VARCHAR) | 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 |
1,432 | <question>: Find the campus fee of "San Jose State University" in year 2000. <context>: CREATE TABLE campuses (id VARCHAR, campus VARCHAR); CREATE TABLE csu_fees (campusfee VARCHAR, campus VARCHAR, year VARCHAR) | 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 |
1,433 | <question>: How many CSU campuses are there? <context>: CREATE TABLE campuses (Id VARCHAR) | SELECT COUNT(*) FROM campuses |
1,434 | <question>: How many candidates are there? <context>: CREATE TABLE candidate (Id VARCHAR) | SELECT COUNT(*) FROM candidate |
1,435 | <question>: Which poll resource provided the most number of candidate information? <context>: CREATE TABLE candidate (poll_source VARCHAR) | SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1 |
1,436 | <question>: what are the top 3 highest support rates? <context>: CREATE TABLE candidate (support_rate VARCHAR) | SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3 |
1,437 | <question>: Find the id of the candidate who got the lowest oppose rate. <context>: CREATE TABLE candidate (Candidate_ID VARCHAR, oppose_rate VARCHAR) | SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1 |
1,438 | <question>: Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate. <context>: CREATE TABLE candidate (Support_rate VARCHAR, Consider_rate VARCHAR, Oppose_rate VARCHAR, unsure_rate VARCHAR) | SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate |
1,439 | <question>: which poll source does the highest oppose rate come from? <context>: CREATE TABLE candidate (poll_source VARCHAR, oppose_rate VARCHAR) | SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1 |
1,440 | <question>: List all people names in the order of their date of birth from old to young. <context>: CREATE TABLE people (name VARCHAR, date_of_birth VARCHAR) | SELECT name FROM people ORDER BY date_of_birth |
1,441 | <question>: Find the average height and weight for all males (sex is M). <context>: CREATE TABLE people (height INTEGER, weight INTEGER, sex VARCHAR) | SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M' |
1,442 | <question>: find the names of people who are taller than 200 or lower than 190. <context>: CREATE TABLE people (name VARCHAR, height VARCHAR) | SELECT name FROM people WHERE height > 200 OR height < 190 |
1,443 | <question>: Find the average and minimum weight for each gender. <context>: CREATE TABLE people (sex VARCHAR, weight INTEGER) | SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex |
1,444 | <question>: Find the name and gender of the candidate who got the highest support rate. <context>: CREATE TABLE candidate (people_id VARCHAR, support_rate VARCHAR); CREATE TABLE people (name VARCHAR, sex VARCHAR, people_id VARCHAR) | 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 |
1,445 | <question>: Find the name of the candidates whose oppose percentage is the lowest for each sex. <context>: CREATE TABLE candidate (people_id VARCHAR); CREATE TABLE people (name VARCHAR, sex VARCHAR, people_id VARCHAR) | 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 |
1,446 | <question>: which gender got the highest average uncertain ratio. <context>: CREATE TABLE candidate (people_id VARCHAR, unsure_rate INTEGER); CREATE TABLE people (sex VARCHAR, people_id VARCHAR) | 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 |
1,447 | <question>: what are the names of people who did not participate in the candidate election. <context>: CREATE TABLE candidate (name VARCHAR, people_id VARCHAR); CREATE TABLE people (name VARCHAR, people_id VARCHAR) | SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate) |
1,448 | <question>: Find the names of the candidates whose support percentage is lower than their oppose rate. <context>: CREATE TABLE candidate (people_id VARCHAR, support_rate INTEGER, oppose_rate VARCHAR); CREATE TABLE people (name VARCHAR, people_id VARCHAR) | 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 |
1,449 | <question>: how many people are there whose weight is higher than 85 for each gender? <context>: CREATE TABLE people (sex VARCHAR, weight INTEGER) | SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex |
1,450 | <question>: find the highest support percentage, lowest consider rate and oppose rate of all candidates. <context>: CREATE TABLE candidate (support_rate INTEGER, consider_rate INTEGER, oppose_rate INTEGER) | SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate |
1,451 | <question>: list all female (sex is F) candidate names in the alphabetical order. <context>: CREATE TABLE candidate (people_id VARCHAR); CREATE TABLE people (name VARCHAR, people_id VARCHAR, sex VARCHAR) | 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 |
1,452 | <question>: find the name of people whose height is lower than the average. <context>: CREATE TABLE people (name VARCHAR, height INTEGER) | SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people) |
1,453 | <question>: List all info about all people. <context>: CREATE TABLE people (Id VARCHAR) | SELECT * FROM people |
1,454 | <question>: Find the titles of all movies directed by steven spielberg. <context>: CREATE TABLE Movie (title VARCHAR, director VARCHAR) | SELECT title FROM Movie WHERE director = 'Steven Spielberg' |
1,455 | <question>: What is the name of the movie produced after 2000 and directed by James Cameron? <context>: CREATE TABLE Movie (title VARCHAR, director VARCHAR, YEAR VARCHAR) | SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000 |
1,456 | <question>: How many movies were made before 2000? <context>: CREATE TABLE Movie (YEAR INTEGER) | SELECT COUNT(*) FROM Movie WHERE YEAR < 2000 |
1,457 | <question>: Who is the director of movie Avatar? <context>: CREATE TABLE Movie (director VARCHAR, title VARCHAR) | SELECT director FROM Movie WHERE title = 'Avatar' |
1,458 | <question>: How many reviewers listed? <context>: CREATE TABLE Reviewer (Id VARCHAR) | SELECT COUNT(*) FROM Reviewer |
1,459 | <question>: What is the id of the reviewer whose name has substring “Mike”? <context>: CREATE TABLE Reviewer (rID VARCHAR, name VARCHAR) | SELECT rID FROM Reviewer WHERE name LIKE "%Mike%" |
1,460 | <question>: What is the reviewer id of Daniel Lewis? <context>: CREATE TABLE Reviewer (rID VARCHAR, name VARCHAR) | SELECT rID FROM Reviewer WHERE name = "Daniel Lewis" |
1,461 | <question>: What is the total number of ratings that has more than 3 stars? <context>: CREATE TABLE Rating (stars INTEGER) | SELECT COUNT(*) FROM Rating WHERE stars > 3 |
1,462 | <question>: What is the lowest and highest rating star? <context>: CREATE TABLE Rating (stars INTEGER) | SELECT MAX(stars), MIN(stars) FROM Rating |
1,463 | <question>: Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year. <context>: CREATE TABLE Movie (mID VARCHAR, year VARCHAR); CREATE TABLE Rating (mID VARCHAR, stars VARCHAR) | SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year |
1,464 | <question>: What are the names of directors who directed movies with 5 star rating? Also return the title of these movies. <context>: CREATE TABLE Movie (director VARCHAR, title VARCHAR, mID VARCHAR); CREATE TABLE Rating (mID VARCHAR, stars VARCHAR) | SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5 |
1,465 | <question>: What is the average rating star for each reviewer? <context>: CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Rating (stars INTEGER, rID VARCHAR) | SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name |
1,466 | <question>: Find the titles of all movies that have no ratings. <context>: CREATE TABLE Rating (title VARCHAR, mID VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR) | SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating) |
1,467 | <question>: Find the names of all reviewers who have ratings with a NULL value for the date. <context>: CREATE TABLE Rating (rID VARCHAR); CREATE TABLE Reviewer (rID VARCHAR) | SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = "null" |
1,468 | <question>: What is the average rating stars and title for the oldest movie? <context>: CREATE TABLE Movie (title VARCHAR, mID VARCHAR, year VARCHAR); CREATE TABLE Rating (stars INTEGER, mID VARCHAR); CREATE TABLE Movie (YEAR INTEGER) | 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) |
1,469 | <question>: What is the name of the most recent movie? <context>: CREATE TABLE Movie (title VARCHAR, YEAR INTEGER) | SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie) |
1,470 | <question>: What is the maximum stars and year for the most recent movie? <context>: CREATE TABLE Rating (stars INTEGER, mID VARCHAR); CREATE TABLE Movie (YEAR INTEGER); CREATE TABLE Movie (year VARCHAR, mID VARCHAR) | 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) |
1,471 | <question>: What is the names of movies whose created year is after all movies directed by Steven Spielberg? <context>: CREATE TABLE Movie (title VARCHAR, YEAR INTEGER, director VARCHAR) | SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = "Steven Spielberg") |
1,472 | <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? <context>: CREATE TABLE Rating (mID VARCHAR, stars INTEGER); CREATE TABLE Movie (title VARCHAR, director VARCHAR, mID VARCHAR) | 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") |
1,473 | <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. <context>: CREATE TABLE Rating (stars VARCHAR, ratingDate VARCHAR, mID VARCHAR, rID VARCHAR); CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR) | 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 |
1,474 | <question>: Find the names of all reviewers who have contributed three or more ratings. <context>: CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Rating (rID VARCHAR) | SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3 |
1,475 | <question>: Find the names of all reviewers who rated Gone with the Wind. <context>: CREATE TABLE Movie (mID VARCHAR, title VARCHAR); CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Rating (mID VARCHAR, rID VARCHAR) | 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' |
1,476 | <question>: Find the names of all directors whose movies are rated by Sarah Martinez. <context>: CREATE TABLE Reviewer (rID VARCHAR, name VARCHAR); CREATE TABLE Movie (director VARCHAR, mID VARCHAR); CREATE TABLE Rating (mID VARCHAR, rID VARCHAR) | 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' |
1,477 | <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. <context>: CREATE TABLE Rating (stars VARCHAR, mID VARCHAR, rID VARCHAR); CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR, director VARCHAR) | 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 |
1,478 | <question>: Return all reviewer names and movie names together in a single list. <context>: CREATE TABLE Reviewer (name VARCHAR, title VARCHAR); CREATE TABLE Movie (name VARCHAR, title VARCHAR) | SELECT name FROM Reviewer UNION SELECT title FROM Movie |
1,479 | <question>: Find the titles of all movies not reviewed by Chris Jackson. <context>: CREATE TABLE Reviewer (rID VARCHAR, name VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR); CREATE TABLE Movie (title VARCHAR); CREATE TABLE Rating (mID VARCHAR, rID VARCHAR) | 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' |
1,480 | <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. <context>: CREATE TABLE Movie (title VARCHAR, director VARCHAR); CREATE TABLE Movie (director VARCHAR, title VARCHAR) | 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 |
1,481 | <question>: For directors who had more than one movie, return the titles and produced years of all movies directed by them. <context>: CREATE TABLE Movie (director VARCHAR, title VARCHAR); CREATE TABLE Movie (title VARCHAR, year VARCHAR, director VARCHAR) | SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title |
1,482 | <question>: What are the names of the directors who made exactly one movie? <context>: CREATE TABLE Movie (director VARCHAR) | SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1 |
1,483 | <question>: What are the names of the directors who made exactly one movie excluding director NULL? <context>: CREATE TABLE Movie (director VARCHAR) | SELECT director FROM Movie WHERE director <> "null" GROUP BY director HAVING COUNT(*) = 1 |
1,484 | <question>: How many movie reviews does each director get? <context>: CREATE TABLE Rating (mID VARCHAR); CREATE TABLE Movie (director VARCHAR, mID VARCHAR) | SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director |
1,485 | <question>: Find the movies with the highest average rating. Return the movie titles and average rating. <context>: CREATE TABLE Rating (stars INTEGER, mID VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR) | 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 |
1,486 | <question>: What are the movie titles and average rating of the movies with the lowest average rating? <context>: CREATE TABLE Rating (stars INTEGER, mID VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR) | 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 |
1,487 | <question>: What are the names and years of the movies that has the top 3 highest rating star? <context>: CREATE TABLE Rating (mID VARCHAR, stars VARCHAR); CREATE TABLE Movie (title VARCHAR, year VARCHAR, mID VARCHAR) | 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 |
1,488 | <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. <context>: CREATE TABLE Rating (stars INTEGER, mID VARCHAR); CREATE TABLE Movie (title VARCHAR, director VARCHAR, mID VARCHAR) | 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 |
1,489 | <question>: Find the title and star rating of the movie that got the least rating star for each reviewer. <context>: CREATE TABLE Rating (rID VARCHAR, stars INTEGER, mID VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR) | 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 |
1,490 | <question>: Find the title and score of the movie with the lowest rating among all movies directed by each director. <context>: CREATE TABLE Rating (stars INTEGER, mID VARCHAR); CREATE TABLE Movie (title VARCHAR, director VARCHAR, mID VARCHAR) | 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 |
1,491 | <question>: What is the name of the movie that is rated by most of times? <context>: CREATE TABLE Rating (mID VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR) | 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 |
1,492 | <question>: What are the titles of all movies that have rating star is between 3 and 5? <context>: CREATE TABLE Rating (mID VARCHAR, stars INTEGER); CREATE TABLE Movie (title VARCHAR, mID VARCHAR) | SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 |
1,493 | <question>: Find the names of reviewers who had given higher than 3 star ratings. <context>: CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Rating (rID VARCHAR, stars INTEGER) | SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3 |
1,494 | <question>: Find the average rating star for each movie that are not reviewed by Brittany Harris. <context>: CREATE TABLE Reviewer (rID VARCHAR, name VARCHAR); CREATE TABLE Rating (mID VARCHAR, stars INTEGER); CREATE TABLE Rating (mID VARCHAR, rID VARCHAR) | 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 |
1,495 | <question>: What are the ids of the movies that are not reviewed by Brittany Harris. <context>: CREATE TABLE Reviewer (rID VARCHAR, name VARCHAR); CREATE TABLE Rating (mID VARCHAR); CREATE TABLE Rating (mID VARCHAR, rID VARCHAR) | 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" |
1,496 | <question>: Find the average rating star for each movie that received at least 2 ratings. <context>: CREATE TABLE Rating (mID VARCHAR, stars INTEGER) | SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2 |
1,497 | <question>: find the ids of reviewers who did not give 4 star. <context>: CREATE TABLE Rating (rID VARCHAR, stars VARCHAR) | SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4 |
1,498 | <question>: Find the ids of reviewers who didn't only give 4 star. <context>: CREATE TABLE Rating (rID VARCHAR, stars VARCHAR) | SELECT rID FROM Rating WHERE stars <> 4 |
1,499 | <question>: What are names of the movies that are either made after 2000 or reviewed by Brittany Harris? <context>: CREATE TABLE Reviewer (rID VARCHAR, name VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR, year VARCHAR); CREATE TABLE Rating (mID VARCHAR, rID VARCHAR) | 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 |