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
When did ameet soni publish ?
assistant
SELECT DISTINCT COUNT ( 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 = 'ameet soni' GROUP BY t3.year ORDER BY t3.year;
human
who else was on the paper with Ameet Soni and Ras Bodik ?
assistant
SELECT DISTINCT t5.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN writes AS t5 ON t5.paperid = t4.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Ameet Soni' AND t1.authorname = 'Ras Bodik';
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
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
journal articles by mohammad rastegari
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 = 'mohammad rastegari' AND t3.journalid >= 0;
human
subhasis chaudhuri
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 = "subhasis chaudhuri" ;