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
what is the total number of showtimes at each cinema?
assistant
SELECT T2.name , SUM( T1.show_times_per_day ) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id;
human
what cinema has the most showings in one day?
assistant
SELECT T2.name FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id ORDER BY SUM( T1.show_times_per_day ) DESC LIMIT 1;
human
What cinema has the highest capacity?
assistant
SELECT Name FROM cinema ORDER BY Capacity DESC LIMIT 1;
human
what cinema is in Cork county?
assistant
SELECT Name FROM cinema WHERE Location = "County Cork" ;