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
How many authors are there?
assistant
SELECT COUNT( * ) FROM authors;
human
How many of those papers are published by 'Atsushi Ohori'?
assistant
SELECT COUNT( * ) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Atsushi" AND t1.lname = "Ohori" ;