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 authors published at sigcse in 2010 ?
assistant
SELECT DISTINCT COUNT ( t2.paperid ) FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2010 AND t3.venuename = 'sigcse';
human
what papers were published in Academic radiology in 1995 ?
assistant
SELECT DISTINCT t2.paperid FROM paper AS t2 JOIN journal AS t1 ON t2.journalid = t1.journalid WHERE t1.journalname = 'Academic radiology' AND t2.year = 1995;
human
papers published in the last year
assistant
SELECT DISTINCT paperid FROM paper WHERE YEAR = ( SELECT MAX ( YEAR ) FROM paper );
human
In 2010 what journal published an article about Trophic Cascade ?
assistant
SELECT DISTINCT t3.journalid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Trophic Cascade' AND t3.year = 2010 GROUP BY t3.journalid;
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
How many papers was published in nature communications in 2015
assistant
SELECT DISTINCT COUNT( t1.paperid ) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = "nature communications" ;