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 the names of editors on the list with at least two journal committees.
assistant
SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT( * ) > = 2;
human
What are the ages of the editors that are at least two journal committees.
assistant
SELECT T1.Age FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT( * ) > = 2;
human
What type of work does Kamila Porczyk do?
assistant
SELECT T2.work_type FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID WHERE T1.name = "Kamila Porczyk" ;