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
papers that were not published in the last year
assistant
SELECT DISTINCT paperid FROM paper WHERE YEAR != 2015;
human
List today 's journals
assistant
SELECT DISTINCT journalid FROM paper WHERE YEAR = 2011 GROUP BY journalid;
human
Who has published more papers in chi ?
assistant
SELECT DISTINCT COUNT ( DISTINCT t2.paperid ) , t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'chi' GROUP BY t1.authorid ORDER BY COUNT ( DISTINCT t2.paperid ) DESC;
human
papers from 2014
assistant
SELECT DISTINCT paperid FROM paper WHERE YEAR = 2014;
human
papers published in the last year
assistant
SELECT DISTINCT paperid FROM paper WHERE YEAR = ( SELECT MAX ( YEAR ) FROM paper );
human
What papers did Liwen Xiong publish last year ?
assistant
SELECT DISTINCT t3.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 = "Liwen Xiong" AND t3.year = 2015 ;