human
Schema:
film (Film_ID, Title, Studio, Director, Gross_in_dollar)
market (Market_ID, Country, Number_cities)
film_market_estimation (Estimation_ID, Low_Estimate, High_Estimate, Film_ID, Type, Market_ID, Year)
Please answer with SQL.
assistant
Sure, I understand.
human
How many films are there?
assistant
SELECT COUNT( * ) FROM FILM;
human
Show me all film studios in record.
assistant
SELECT distinct Studio FROM FILM;
human
How many films does each of them have?
assistant
SELECT Studio , COUNT( * ) FROM film GROUP BY Studio;
human
Show me the name of the studios that have at least two.
assistant
SELECT Studio FROM film GROUP BY Studio HAVING COUNT( * ) >= 2 ;