target-benchmark/spider-queries huggingface dataset:
Database: warehouse_1 (tables: boxes, warehouses)
Question: For each warehouse location, what is the value of the most expensive box?
SQL: SELECT max(T1.value) ,  T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code GROUP BY T2.location
Database: warehouse_1 (tables: boxes)
Question: Select the warehouse codes along with the number of boxes in each warehouse.
SQL: SELECT Warehouse ,  count(*) FROM boxes GROUP BY warehouse
Database: warehouse_1 (tables: boxes)
Question: How many boxes are there with each warehouse ?
SQL: select warehouse ,  count(*) from boxes group by warehouse
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find the number of different locations where Rocks are stored.
SQL: SELECT count(DISTINCT LOCATION) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks'
Database: warehouse_1 (tables: boxes, warehouses)
Question: In how many different warehouses are Rocks stored within boxes?
SQL: SELECT count(DISTINCT LOCATION) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks'
Database: warehouse_1 (tables: boxes, warehouses)
Question: Select the code of each box, along with the name of the city the box is located in.
SQL: SELECT T1.code ,  T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.Warehouse  =  T2.Code
Database: warehouse_1 (tables: boxes, warehouses)
Question: What are the codes of all boxes, as well as the locations of the warehouses they are in?
SQL: SELECT T1.code ,  T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.Warehouse  =  T2.Code
Database: warehouse_1 (tables: boxes, warehouses)
Question: Select the codes of all the boxes located in Chicago.
SQL: SELECT T1.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago'
Database: warehouse_1 (tables: boxes, warehouses)
Question: What are the codes of boxes stored in warehouses in Chicago?
SQL: SELECT T1.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago'
Database: warehouse_1 (tables: boxes)
Question: Find the number of boxes saved in each warehouse.
SQL: SELECT count(*) ,  warehouse FROM boxes GROUP BY warehouse
Database: warehouse_1 (tables: boxes)
Question: How many boxes are stored in each warehouse?
SQL: SELECT count(*) ,  warehouse FROM boxes GROUP BY warehouse
Database: warehouse_1 (tables: boxes)
Question: Find the number of distinct types of contents in each warehouse.
SQL: SELECT count(DISTINCT CONTENTS) ,  warehouse FROM boxes GROUP BY warehouse
Database: warehouse_1 (tables: boxes)
Question: How many different types of contents are stored in each warehouse?
SQL: SELECT count(DISTINCT CONTENTS) ,  warehouse FROM boxes GROUP BY warehouse
Database: warehouse_1 (tables: boxes, warehouses)
Question: Select the codes of all warehouses that are above capacity.
SQL: SELECT T2.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code GROUP BY T2.code HAVING count(*)  >  T2.capacity
Database: warehouse_1 (tables: boxes, warehouses)
Question: What are the codes of warehouses that have more boxes than their capacity?
SQL: SELECT T2.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code GROUP BY T2.code HAVING count(*)  >  T2.capacity
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find the total values of boxes that are not in the warehouses located at Chicago.
SQL: SELECT sum(T1.value) FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location != 'Chicago'
Database: warehouse_1 (tables: boxes, warehouses)
Question: What is the total value of boxes contained in any location but Chicago?
SQL: SELECT sum(T1.value) FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location != 'Chicago'
Database: university_rank (tables: university)
Question: Show name, city, and state for all universities in  alphabetical order of university name.
SQL: SELECT university_name ,  city ,  state FROM University ORDER BY university_name
Database: university_rank (tables: university)
Question: What are the names, cities, and states of all universities in alphabetical order (by name of the university).
SQL: SELECT university_name ,  city ,  state FROM University ORDER BY university_name
Database: university_rank (tables: university)
Question: How many universities are in Illinois or Ohio?
SQL: SELECT count(*) FROM University WHERE state  =  'Illinois' OR state  =  'Ohio'
Database: university_rank (tables: university)
Question: What is the total number of universities located in Illinois or Ohio?
SQL: SELECT count(*) FROM University WHERE state  =  'Illinois' OR state  =  'Ohio'
Database: university_rank (tables: university)
Question: What is the maximum, average, and minimum enrollment for universities?
SQL: SELECT max(enrollment) ,  avg(enrollment) ,  min(enrollment) FROM University
Database: university_rank (tables: university)
Question: What is the maximum, average, and minimum enrollment for all universities?
SQL: SELECT max(enrollment) ,  avg(enrollment) ,  min(enrollment) FROM University
Database: university_rank (tables: university)
Question: List team name for all universities with enrollments above the average.
SQL: SELECT team_name FROM University WHERE enrollment  >  (SELECT avg(enrollment) FROM University)
Database: university_rank (tables: university)
Question: What are the names of all teams from universities that have more people enrolled than average ?
SQL: select team_name from university where enrollment  >  (select avg(enrollment) from university)
Database: university_rank (tables: university)
Question: Show all home conferences.
SQL: SELECT DISTINCT home_conference FROM University
Database: university_rank (tables: university)
Question: What are the different home conferences from the university table?
SQL: SELECT DISTINCT home_conference FROM University
Database: university_rank (tables: university)
Question: Show all home conferences and the number of universities in each conference.
SQL: SELECT home_conference ,  count(*) FROM University GROUP BY home_conference
Database: university_rank (tables: university)
Question: For every home conference, how many universities attended that conference?
SQL: SELECT home_conference ,  count(*) FROM University GROUP BY home_conference
Database: university_rank (tables: university)
Question: Which state has most number of universities?
SQL: SELECT state FROM University GROUP BY state ORDER BY count(*) DESC LIMIT 1
Database: university_rank (tables: university)
Question: What is the state with the most universities?
SQL: SELECT state FROM University GROUP BY state ORDER BY count(*) DESC LIMIT 1
Database: university_rank (tables: university)
Question: Show all home conferences with average enrollment of universities above 2000.
SQL: SELECT home_conference FROM University GROUP BY home_conference HAVING avg(enrollment)  >  2000
Database: university_rank (tables: university)
Question: What are the home conferences that have an average university enrollment above 2000?
SQL: SELECT home_conference FROM University GROUP BY home_conference HAVING avg(enrollment)  >  2000
Database: university_rank (tables: university)
Question: Which conference has the least number of total enrollment?
SQL: SELECT home_conference FROM University GROUP BY home_conference ORDER BY sum(enrollment) LIMIT 1
Database: university_rank (tables: university)
Question: What are the home conferences with the fewest number of people enrolled?
SQL: SELECT home_conference FROM University GROUP BY home_conference ORDER BY sum(enrollment) LIMIT 1
Database: university_rank (tables: major)
Question: List all major name and major code in the order of their major code
SQL: SELECT major_name ,  major_code FROM Major ORDER BY major_code
Database: university_rank (tables: major)
Question: What are the names and codes for all majors ordered by their code?
SQL: SELECT major_name ,  major_code FROM Major ORDER BY major_code
Database: university_rank (tables: major_ranking, university, major)
Question: Show all majors and major ranks for the university with name Augustana College.
SQL: SELECT T1.rank ,  T3.major_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T2.university_name  =  'Augustana College'
Database: university_rank (tables: major_ranking, university, major)
Question: What are the ranks and names of all majors at Augustana College?
SQL: SELECT T1.rank ,  T3.major_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T2.university_name  =  'Augustana College'
Database: university_rank (tables: major_ranking, university, major)
Question: What is the name, city, state of the university with a rank 1 on Accounting major?
SQL: SELECT T2.university_name ,  T2.city ,  T2.state FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T1.rank  =  1 AND T3.major_name  =  'Accounting'
Database: university_rank (tables: major_ranking, university, major)
Question: What is the name, city, and state of the university with number 1 ranked Accounting major?
SQL: SELECT T2.university_name ,  T2.city ,  T2.state FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T1.rank  =  1 AND T3.major_name  =  'Accounting'
Database: university_rank (tables: major_ranking, university)
Question: What is the name of the university that has most number of majors with rank 1?
SQL: SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id  =  T2.university_id WHERE T1.rank  =  1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1
Database: university_rank (tables: major_ranking, university)
Question: What is the name of the university with the most majors ranked number 1?
SQL: SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id  =  T2.university_id WHERE T1.rank  =  1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1
Database: university_rank (tables: major_ranking, university)
Question: Show all university names without a major with rank 1?
SQL: SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id  =  T2.university_id WHERE T1.rank  =  1
Database: university_rank (tables: major_ranking, university)
Question: What are the names of all universities without any majors ranked number 1?
SQL: SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id  =  T2.university_id WHERE T1.rank  =  1
Database: university_rank (tables: major_ranking, university, major)
Question: Show all university names with both major Accounting and major Urban Education.
SQL: SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T3.major_name  =  'Accounting' INTERSECT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T3.major_name  =  'Urban Education'
Database: university_rank (tables: major_ranking, university, major)
Question: What are the names of all universities that have both Accounting and Urban Education majors?
SQL: SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T3.major_name  =  'Accounting' INTERSECT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T3.major_name  =  'Urban Education'
Database: university_rank (tables: overall_ranking, university)
Question: What is the name and overall ranking of universities in Wisconsin state?
SQL: SELECT T1.university_name ,  T2.rank FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id WHERE T1.state  =  'Wisconsin'
Database: university_rank (tables: overall_ranking, university)
Question: What is the name and rank of every university in Wisconsin?
SQL: SELECT T1.university_name ,  T2.rank FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id WHERE T1.state  =  'Wisconsin'
Database: university_rank (tables: overall_ranking, university)
Question: What is the university name with highest research point?
SQL: SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id ORDER BY T2.research_point DESC LIMIT 1
Database: university_rank (tables: overall_ranking, university)
Question: What is the name of the university with the most research points?
SQL: SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id ORDER BY T2.research_point DESC LIMIT 1
Database: university_rank (tables: overall_ranking, university)
Question: List all university names in ascending order of their reputation points.
SQL: SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id ORDER BY T2.reputation_point
Database: university_rank (tables: overall_ranking, university)
Question: What are the names of all universities in ascending order of reputation points?
SQL: SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id ORDER BY T2.reputation_point
Database: university_rank (tables: major_ranking, university, major)
Question: What is the name of university with major Accounting ranked 3 or above?
SQL: SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T1.rank  <=  3 AND T3.major_name  =  "Accounting"
Database: university_rank (tables: major_ranking, university, major)
Question: What are the names of the university with an Accounting major ranked 3 or higher?
SQL: SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T1.rank  <=  3 AND T3.major_name  =  "Accounting"
Database: university_rank (tables: overall_ranking, university)
Question: What is the total enrollment of universities with a overall rank 5 or below?
SQL: SELECT sum(enrollment) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id WHERE T2.rank  >=  5
Database: university_rank (tables: overall_ranking, university)
Question: What is the total number of students enrolled in an university with a rank of 5 or below?
SQL: SELECT sum(enrollment) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id WHERE T2.rank  >=  5
Database: university_rank (tables: overall_ranking, university)
Question: Find the name and Citation point of the universities whose reputation points are top 3 and above.
SQL: SELECT T1.University_Name ,  T2.Citation_point FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id ORDER BY T2.Reputation_point DESC LIMIT 3
Database: university_rank (tables: overall_ranking, university)
Question: What is the name and citation point of the unversities with the top 3 reputation points?
SQL: SELECT T1.University_Name ,  T2.Citation_point FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id ORDER BY T2.Reputation_point DESC LIMIT 3
Database: university_rank (tables: university)
Question: which states do have more than two universities with enrollment smaller than 3000?
SQL: SELECT state FROM university WHERE enrollment  <  3000 GROUP BY state HAVING count(*)  >  2
Database: university_rank (tables: university)
Question: What are the states that have more than 2 universities with an enrollment less than 3000?
SQL: SELECT state FROM university WHERE enrollment  <  3000 GROUP BY state HAVING count(*)  >  2
Database: movie_2 (tables: movies)
Question: Find the titles of movies that don’t have any rating.
SQL: SELECT title FROM movies WHERE rating  =  'null'
Database: movie_2 (tables: movies)
Question: What are the names of movies that do not have any ratings?
SQL: SELECT title FROM movies WHERE rating  =  'null'
Database: movie_2 (tables: movies)
Question: Find the names of movies whose rating is ‘G’.
SQL: SELECT title FROM movies WHERE rating  =  'G'
Database: movie_2 (tables: movies)
Question: What are names of movies that have a 'G' ratings?
SQL: SELECT title FROM movies WHERE rating  =  'G'
Database: movie_2 (tables: movietheaters, movies)
Question: Find the title of the movie that is played in the Odeon theater.
SQL: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon'
Database: movie_2 (tables: movietheaters, movies)
Question: What are the movie titles for ones that are played in the Odeon theater?
SQL: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon'
Database: movie_2 (tables: movietheaters, movies)
Question: Find the names of movies that are played in any theater and the name of the corresponding theater.
SQL: SELECT T1.title ,  T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie
Database: movie_2 (tables: movietheaters, movies)
Question: What are the names of the movies that are played in any theater and the name of the corresponding theater?
SQL: SELECT T1.title ,  T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie
Database: movie_2 (tables: movies)
Question: Find the number of movies whose rating is ‘G’.
SQL: SELECT count(*) FROM movies WHERE rating  =  'G'
Database: movie_2 (tables: movies)
Question: How many movies had a 'G' rating?
SQL: SELECT count(*) FROM movies WHERE rating  =  'G'
Database: movie_2 (tables: movietheaters, movies)
Question: How many movies are playing across all theaters?
SQL: SELECT count(*) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie
Database: movie_2 (tables: movietheaters, movies)
Question: How many movies are playing in theaters?
SQL: SELECT count(*) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie
Database: movie_2 (tables: movietheaters, movies)
Question: How many distinct movies are on in theaters?
SQL: SELECT count(DISTINCT T1.code) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie
Database: movie_2 (tables: movietheaters, movies)
Question: How many different movies are playing?
SQL: SELECT count(DISTINCT T1.code) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie
Database: movie_2 (tables: movietheaters)
Question: How many distinct movie theaters are there?
SQL: SELECT count(DISTINCT name) FROM movietheaters
Database: movie_2 (tables: movietheaters)
Question: How many different movie theaters exist?
SQL: SELECT count(DISTINCT name) FROM movietheaters
Database: movie_2 (tables: movies)
Question: Find the rating of the movie whose name includes the word ‘Citizen’.
SQL: SELECT rating FROM movies WHERE title LIKE '%Citizen%'
Database: movie_2 (tables: movies)
Question: What is the rating of the movie what has a name including a word like 'Citizen'?
SQL: SELECT rating FROM movies WHERE title LIKE '%Citizen%'
Database: movie_2 (tables: movies)
Question: Find the name of the cinemas that are playing movies with either rating ‘G’ or rating ‘PG’.
SQL: SELECT title FROM movies WHERE rating  =  'G' OR rating  =  'PG'
Database: movie_2 (tables: movies)
Question: What are the names of the movie theaters that are playing 'G' or 'PG' rated movies?
SQL: SELECT title FROM movies WHERE rating  =  'G' OR rating  =  'PG'
Database: movie_2 (tables: movietheaters, movies)
Question: Find the name of the movies that are played in either cinema Odeon or Imperial.
SQL: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon' OR T2.name  =  'Imperial'
Database: movie_2 (tables: movietheaters, movies)
Question: What are the titles of all the movies that played at the Odeon or Imperial theater?
SQL: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon' OR T2.name  =  'Imperial'
Database: movie_2 (tables: movietheaters, movies)
Question: Find the name of the movie that is on in both Odeon and Imperial theaters.
SQL: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon' INTERSECT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Imperial'
Database: movie_2 (tables: movietheaters, movies)
Question: What movie is playing at both the Odeon and Imperial theater?
SQL: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon' INTERSECT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Imperial'
Database: movie_2 (tables: movietheaters, movies)
Question: Find the name of all movies that are not played in Odeon theater.
SQL: SELECT title FROM movies EXCEPT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon'
Database: movie_2 (tables: movietheaters, movies)
Question: What are the names of every movie that is not playing at the Odeon theater?
SQL: SELECT title FROM movies EXCEPT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon'
Database: movie_2 (tables: movies)
Question: List in alphabetical order the titles of all movies.
SQL: SELECT title FROM movies ORDER BY title
Database: movie_2 (tables: movies)
Question: What are the movie names in alphabetical order?
SQL: SELECT title FROM movies ORDER BY title
Database: movie_2 (tables: movies)
Question: Find the titles of all movies sorted by their ratings.
SQL: SELECT title FROM movies ORDER BY rating
Database: movie_2 (tables: movies)
Question: What are the movie names sorted by rating?
SQL: SELECT title FROM movies ORDER BY rating
Database: movie_2 (tables: movietheaters)
Question: Find the name of the theater that is playing the most number of movies.
SQL: SELECT name FROM movietheaters GROUP BY name ORDER BY count(*) DESC LIMIT 1
Database: movie_2 (tables: movietheaters)
Question: What is the name of the theater playing the most movies?
SQL: SELECT name FROM movietheaters GROUP BY name ORDER BY count(*) DESC LIMIT 1
Database: movie_2 (tables: movietheaters, movies)
Question: Find the name of the movie that is played in the most number of theaters.
SQL: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie GROUP BY T1.title ORDER BY count(*) DESC LIMIT 1
Database: movie_2 (tables: movietheaters, movies)
Question: What is the name of the film playing at the most number of theaters?
SQL: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie GROUP BY T1.title ORDER BY count(*) DESC LIMIT 1
Database: movie_2 (tables: movies)
Question: Find the number of movies in each rating.
SQL: SELECT count(*) ,  rating FROM movies GROUP BY rating
Database: movie_2 (tables: movies)
Question: How many movies exist for each rating?
SQL: SELECT count(*) ,  rating FROM movies GROUP BY rating
Database: movie_2 (tables: movies)
Question: Find the number of movies whose rating is not null.
SQL: SELECT count(*) ,  rating FROM movies WHERE rating != 'null' GROUP BY rating
Database: movie_2 (tables: movies)
Question: How many movies have a rating that is not null?
SQL: SELECT count(*) ,  rating FROM movies WHERE rating != 'null' GROUP BY rating
Database: movie_2 (tables: movietheaters)
Question: Find the name of theaters that has at least one movie playing.
SQL: SELECT name FROM movietheaters GROUP BY name HAVING count(*)  >=  1