Database schema:
CREATE TABLE Movies (
  Code NUMBER PRIMARY KEY,
  Title TEXT,
  Rating TEXT
);
CREATE TABLE MovieTheaters (
  Code NUMBER PRIMARY KEY,
  Name TEXT,
  Movie NUMBER,
  FOREIGN KEY (Movie) REFERENCES Movies(Code)
);

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'

Question: Find the titles of movies that don’t have any rating.
SQL: SELECT title FROM movies WHERE rating  =  'null'

Question: Find the number of movies in each rating.
SQL: SELECT count(*) ,  rating FROM movies GROUP BY rating

Question: Select the name of all movie theaters that are not currently showing a movie.
SQL: SELECT DISTINCT name FROM MovieTheaters WHERE Movie  =  'null'

Question: Find the number of movies whose rating is not null.
SQL: SELECT count(*) ,  rating FROM movies WHERE rating != 'null' GROUP BY rating

Question: What are the names of the movies not being shown in any theaters?
SQL: SELECT Title FROM Movies WHERE Code NOT IN (SELECT Movie FROM MovieTheaters WHERE Movie != 'null')

Question: How many distinct movie theaters are there?
SQL: SELECT count(DISTINCT name) FROM movietheaters

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'

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

Question: What are the movie names sorted by rating?
SQL: SELECT title FROM movies ORDER BY rating

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

Question: Find the names of movies whose rating is ‘G’.
SQL: SELECT title FROM movies WHERE rating  =  'G'

Question: What are the names of theaters playing 'G' rated movies?
SQL: SELECT T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T1.rating  =  'G'

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

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

Question: How many movies have a rating that is not null?
SQL: SELECT count(*) ,  rating FROM movies WHERE rating != 'null' GROUP BY rating

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

Question: How many different movie theaters exist?
SQL: SELECT count(DISTINCT name) FROM movietheaters

Question: Show all information of all unrated movies.
SQL: SELECT * FROM movies WHERE rating  =  'null'

Question: What are the movie names in alphabetical order?
SQL: SELECT title FROM movies ORDER BY title

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'

Question: How many movies exist for each rating?
SQL: SELECT count(*) ,  rating FROM movies GROUP BY rating

Question: What are the names of all cinemas not showing any movies?
SQL: SELECT DISTINCT name FROM MovieTheaters WHERE Movie  =  'null'

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'

Question: Find the number of movies whose rating is ‘G’.
SQL: SELECT count(*) FROM movies WHERE rating  =  'G'

Question: Find the rating of the movie whose name includes the word ‘Citizen’.
SQL: SELECT rating FROM movies WHERE title LIKE '%Citizen%'

Question: List in alphabetical order the titles of all movies.
SQL: SELECT title FROM movies ORDER BY title

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'

Question: What are the names of every theater with at least one movie playing?
SQL: SELECT name FROM movietheaters GROUP BY name HAVING count(*)  >=  1

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

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%'

Question: What are all of the movie names?
SQL: SELECT title FROM movies

Question: Show all the distinct ratings in the database.
SQL: SELECT DISTINCT rating FROM movies

Question: How many movies had a 'G' rating?
SQL: SELECT count(*) FROM movies WHERE rating  =  'G'

Question: Find the name of theaters that has at least one movie playing.
SQL: SELECT name FROM movietheaters GROUP BY name HAVING count(*)  >=  1