human
Schema:
workshop (Workshop_ID, Date, Venue, Name)
submission (Submission_ID, Scores, Author, College)
Acceptance (Submission_ID, Workshop_ID, Result)
Please answer with SQL.
assistant
Sure, I understand.
human
Show the authors of submissions and the acceptance results of their submissions.
assistant
SELECT T2.Author , T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID
human
Show the authors who have submissions to more than one workshop.
assistant
SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1
human
What are the authors of submissions and their colleges?
assistant
SELECT Author , College FROM submission
human
What is the author of the submission with the highest score?
assistant
SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1
human
What is the average score of submissions?
assistant
SELECT avg(Scores) FROM submission
human
How many submissions are there?
assistant
SELECT COUNT( * ) FROM submission ;