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
Give me the papers written by Su-In Lee before 2012 .
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 = 'Su-In Lee' AND t3.year < 2012;
human
List today 's journals
assistant
SELECT DISTINCT journalid FROM paper WHERE YEAR = 2011 GROUP BY journalid;
human
What are some papers dealing with Semantic Data in YAGO ?
assistant
SELECT DISTINCT t2.paperid FROM paperdataset AS t3 JOIN dataset AS t1 ON t3.datasetid = t1.datasetid JOIN paperkeyphrase AS t2 ON t2.paperid = t3.paperid JOIN keyphrase AS t4 ON t2.keyphraseid = t4.keyphraseid WHERE t1.datasetname = 'YAGO' AND t4.keyphrasename = 'Semantic Data';
human
When does Michael Stonebraker publish the first VLDB paper ?
assistant
SELECT DISTINCT t3.year 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 = 'Michael Stonebraker' AND t4.venuename = 'VLDB' ORDER BY t3.year;
human
papers from 2014
assistant
SELECT DISTINCT paperid FROM paper WHERE YEAR = 2014;
human
papers about WebKB
assistant
SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = "WebKB" ;