CREATE TABLE authorship (authid VARCHAR2, paperid VARCHAR2)
CREATE TABLE papers (paperid VARCHAR2)
CREATE TABLE authors (lname VARCHAR2, fname VARCHAR2, authid VARCHAR2)

What is the last name of the author that has published the most papers?
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1
SELECT "t1"."lname" FROM "authors" "t1" JOIN "authorship" "t2" ON "t1"."authid" = "t2"."authid" JOIN "papers" "t3" ON "t2"."paperid" = "t3"."paperid" GROUP BY "t1"."fname", "t1"."lname" ORDER BY COUNT(*) DESC FETCH FIRST 1 ROWS ONLY