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
which journal did Donald E Knuth publish his last paper ?
assistant
SELECT DISTINCT t3.journalid , 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 = 'Donald E Knuth' GROUP BY t3.journalid , t3.year ORDER BY t3.year DESC;
human
What paper did Michael Armstrong wrote in the 90s ?
assistant
SELECT DISTINCT t3.year , t2.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 LIKE 'Michael Armstrong' AND t3.year LIKE '199';
human
papers citing Daniel Jurafsky
assistant
SELECT DISTINCT t3.paperid FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citingpaperid JOIN writes AS t2 ON t2.paperid = t4.citedpaperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Daniel Jurafsky';
human
keyphrases used by dan klein in his emnlp papers
assistant
SELECT DISTINCT t2.keyphraseid FROM paper AS t3 JOIN paperkeyphrase AS t2 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid JOIN writes AS t5 ON t5.paperid = t3.paperid JOIN author AS t1 ON t5.authorid = t1.authorid WHERE t1.authorname = 'dan klein' AND t4.venuename = 'emnlp';
human
How many papers did michael i. jordan publish in 2016 ?
assistant
SELECT DISTINCT COUNT ( t2.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 = 'michael i. jordan' AND t3.year = 2016;
human
how many of dan klein 's papers cite michael i. jordan
assistant
SELECT DISTINCT COUNT( t5.citingpaperid ) FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN cite AS t5 ON t3.paperid = t5.citedpaperid JOIN writes AS t4 ON t4.paperid = t5.citingpaperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "michael i. jordan" AND t1.authorname = "dan klein" ;