human
Schema:
film (Film_ID, Rank_in_series, Number_in_season, Title, Directed_by, Original_air_date, Production_code)
cinema (Cinema_ID, Name, Openning_year, Capacity, Location)
schedule (Cinema_ID, Film_ID, Date, Show_times_per_day, Price)
Please answer with SQL.
assistant
Sure, I understand.
human
How many directors have multiple show times?
assistant
SELECT COUNT( distinct T2.directed_by ) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id WHERE T1.show_times_per_day > 1;
human
What are the names of the two directors who have multiple show times?
assistant
SELECT distinct T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id WHERE T1.show_times_per_day > 1;
human
How many show times does BIll Schreiner have
assistant
SELECT SUM( T1.show_times_per_day ) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id WHERE t2.directed_by = "Bill Schreiner" GROUP BY T2.directed_by ;