Database: film_rank

Question: What are the maximum and minimum number of cities in all markets.
SQL: SELECT max(Number_cities) ,  min(Number_cities) FROM market

Question: Show the distinct director of films with market estimation in the year of 1995.
SQL: SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID  =  T2.Film_ID WHERE T2.Year  =  1995

Question: What is the average number of cities of markets with low film market estimate bigger than 10000?
SQL: SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID WHERE T1.Low_Estimate  >  10000

Question: Please list the years of film market estimations when the market is in country "Japan" in descending order.
SQL: SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID WHERE T2.Country  =  "Japan" ORDER BY T1.Year DESC

Question: List the name of film studio that have the most number of films.
SQL: SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1

Question: List the names of studios that have at least two films.
SQL: SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*)  >=  2

Question: List the title of films that do not have any market estimation.
SQL: SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)

Question: Show the studios that have produced films with director "Nicholas Meyer" and "Walter Hill".
SQL: SELECT Studio FROM film WHERE Director  =  "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director  =  "Walter Hill"

Question: Find the titles and studios of the films that are produced by some film studios that contained the word "Universal".
SQL: SELECT title ,  Studio FROM film WHERE Studio LIKE "%Universal%"

Question: Show the studios that have not produced films with director "Walter Hill".
SQL: SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director  =  "Walter Hill"

Question: List the studios which average gross is above 4500000.
SQL: SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar)  >=  4500000

Question: What is the title of the film that has the highest high market estimation.
SQL: SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2  ON T1.Film_ID  =  T2.Film_ID ORDER BY high_estimate DESC LIMIT 1