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
How many papers did Mirella Lapata cite ?
assistant
SELECT DISTINCT COUNT ( t3.citedpaperid ) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN cite AS t3 ON t2.paperid = t3.citingpaperid WHERE t1.authorname = 'Mirella Lapata';
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
How many papers has Noah Smith co-authored since 2009 ?
assistant
SELECT DISTINCT COUNT ( DISTINCT t2.paperid ) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname != 'Noah Smith' AND t3.year > 2009 AND t2.paperid IN ( SELECT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname LIKE 'Noah Smith' );
human
What is the paper with the most citation about Artificial Intelligence ?
assistant
SELECT DISTINCT t4.citedpaperid , COUNT ( t4.citingpaperid ) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'Artificial Intelligence' GROUP BY t4.citedpaperid ORDER BY COUNT ( t4.citingpaperid ) DESC;
human
What is the most cited paper by ohad shamir ?
assistant
SELECT DISTINCT t4.citedpaperid , COUNT ( t4.citedpaperid ) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'ohad shamir' GROUP BY t4.citedpaperid ORDER BY COUNT ( t4.citedpaperid ) DESC;
human
How many citations does Dan Makumbi 's Genetic Identity paper have ?
assistant
SELECT DISTINCT COUNT( t5.citingpaperid ) FROM paperkeyphrase AS t2 JOIN keyphrase AS t3 ON t2.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t2.paperid JOIN cite AS t5 ON t4.paperid = t5.citedpaperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = "Dan Makumbi" AND t3.keyphrasename = "Genetic Identity" ;