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
How many papers are there?
assistant
SELECT COUNT( * ) FROM PAPERS;
human
What are all the institutions?
assistant
SELECT * FROM INST;
human
Give me the number of papers published by ''University of Pennsylvania''.
assistant
SELECT COUNT( DISTINCT t1.title ) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "University of Pennsylvania" ;