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 are all the papers?
assistant
SELECT * FROM papers;
human
Give me those whose title contains 'Monadic'.
assistant
SELECT * FROM papers WHERE title LIKE '%Monadic%';
human
Who wrote any of those? Give me the last names only.
assistant
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 WHERE t3.title LIKE "%Monadic%" ;