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
what datasets did jitendra malik use ?
assistant
SELECT DISTINCT t2.datasetid FROM paper AS t3 JOIN paperdataset AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'jitendra malik';
human
does ras bodik publish a lot ?
assistant
SELECT COUNT ( 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 = 'ras bodik';
human
the papers on semantic parsing by li dong at acl in 2016
assistant
SELECT DISTINCT t2.paperid FROM paperkeyphrase AS t5 JOIN keyphrase AS t3 ON t5.keyphraseid = t3.keyphraseid JOIN paper AS t2 ON t2.paperid = t5.paperid JOIN venue AS t6 ON t6.venueid = t2.venueid JOIN writes AS t4 ON t4.paperid = t2.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'li dong' AND t3.keyphrasename = 'semantic parsing' AND t2.year = 2016 AND t6.venuename = 'acl';
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 papers has Liwen Xiong written in 2015
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;
human
Where did li dong publish in 2016
assistant
SELECT DISTINCT t3.venueid 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 = "li dong" AND t3.year = 2016 ;