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 publications were added to the Cell journal this year ?
assistant
SELECT DISTINCT COUNT ( t3.paperid ) FROM paper AS t3 JOIN journal AS t2 ON t3.journalid = t2.journalid JOIN paperkeyphrase AS t1 ON t3.paperid = t1.paperid WHERE t2.journalname = 'Cell' AND t3.year = 2015;
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';
human
How many papers did David M. Blei publish at AISTATS ?
assistant
SELECT DISTINCT COUNT ( t3.paperid ) FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'David M. Blei' AND t4.venuename = 'AISTATS';
human
Has mirella lapata written any papers in 2016 ?
assistant
SELECT DISTINCT COUNT ( t3.paperid ) , t2.authorid 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 = 'mirella lapata' AND t3.year = 2016 GROUP BY t2.authorid;
human
What are the 5 most recent papers of Mirella Lapata ?
assistant
SELECT DISTINCT t3.paperid , t3.year 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 = 'Mirella Lapata' ORDER BY t3.year DESC LIMIT 5;
human
how many papers does 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" ;