human
Schema:
venue (venueId, venueName)
author (authorId, authorName)
dataset (datasetId, datasetName)
journal (journalId, journalName)
keyphrase (keyphraseId, keyphraseName)
paper (paperId, title, venueId, year, numCiting, numCitedBy, journalId)
cite (citingPaperId, citedPaperId)
paperDataset (paperId, datasetId)
paperKeyphrase (paperId, keyphraseId)
writes (paperId, authorId)
Please answer with SQL.
assistant
Sure, I understand.
human
Who writes a lot of papers in Machine Learning ?
assistant
SELECT DISTINCT t1.authorname FROM paperkeyphrase AS t2 JOIN keyphrase AS t4 ON t2.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t2.paperid JOIN author AS t1 ON t3.authorid = t1.authorid WHERE t4.keyphrasename = 'Machine Learning' GROUP BY t1.authorname ORDER BY COUNT ( DISTINCT t3.paperid ) DESC;
human
papers that are coauthored by Peter Mertens and Dina Barbian
assistant
SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';
human
who has written the most syntactic parsing papers ?
assistant
SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
human
authors with at least 5 papers
assistant
SELECT DISTINCT COUNT ( t2.paperid ) , t1.authorid FROM writes AS t1 JOIN paper AS t2 ON t1.paperid = t2.paperid GROUP BY t1.authorid HAVING COUNT ( t2.paperid ) >= 5;
human
Which authors published papers in 2015 ?
assistant
SELECT DISTINCT t1.authorid FROM writes AS t1 JOIN paper AS t2 ON t1.paperid = t2.paperid WHERE t2.year = 2015;
human
I want the co-authors of papers on Machine Translation Output with Philipp Koehn
assistant
SELECT DISTINCT t1.authorid FROM paperkeyphrase AS t6 JOIN keyphrase AS t3 ON t6.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t6.paperid JOIN writes AS t5 ON t5.paperid = t4.paperid JOIN author AS t1 ON t5.authorid = t1.authorid JOIN author AS t2 ON t4.authorid = t2.authorid WHERE t2.authorname = "Philipp Koehn" AND t3.keyphrasename = "Machine Translation Output" ;