human
Schema:
journal (Journal_ID, Date, Theme, Sales)
editor (Editor_ID, Name, Age)
journal_committee (Editor_ID, Journal_ID, Work_Type)
Please answer with SQL.
assistant
Sure, I understand.
human
Show average sales of the journals that have an editor whose work type is photo
assistant
SELECT AVG ( T1.sales ) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = "Photo" ;