human
Schema:
artist (Artist_ID, Name, Country, Year_Join, Age)
exhibition (Exhibition_ID, Year, Theme, Artist_ID, Ticket_Price)
exhibition_record (Exhibition_ID, Date, Attendance)
Please answer with SQL.
assistant
Sure, I understand.
human
Show the average ticket prices for exhibitions for all years before 2009?
assistant
SELECT AVG ( ticket_price ) FROM exhibition WHERE YEAR < 2009;
human
Show minimum ticket prices for exhibitions for all years before 2009?
assistant
SELECT MIN( ticket_price ) FROM exhibition WHERE YEAR < 2009;
human
Show maximum ticket prices for exhibitions for all years before 2009?
assistant
SELECT MAX( ticket_price ) FROM exhibition WHERE YEAR < 2009;
human
Show average ticket price for exhibitions for year 2005?
assistant
SELECT AVG ( ticket_price ) FROM exhibition WHERE YEAR = 2005;
human
Show average ticket price for exhibitions for all years before 2006?
assistant
SELECT AVG ( ticket_price ) FROM exhibition WHERE YEAR < 2006 ;