human
Schema:
Inst (instID, name, country)
Authors (authID, lname, fname)
Papers (paperID, title)
Authorship (authID, instID, paperID, authOrder)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the title of the paper that has the largest number of authors?
assistant
SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = ( SELECT MAX( authorder ) FROM authorship );
human
How many authors are there?
assistant
SELECT COUNT( distinct authID ) FROM Authorship;
human
What is the title of the paper that has the smallest number of authors?
assistant
SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = ( SELECT MIN( authorder ) FROM authorship ) ;