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
How many papers does jamie callan publish each year ?
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 = 'jamie callan' GROUP BY t3.year;
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
What is the most cited paper at sigcomm ?
assistant
SELECT DISTINCT t3.citedpaperid , COUNT ( t3.citingpaperid ) FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t2.venuename = 'sigcomm' GROUP BY t3.citedpaperid ORDER BY COUNT ( t3.citingpaperid ) DESC;
human
How many authors published at sigcse in 2010 ?
assistant
SELECT DISTINCT COUNT ( t2.paperid ) FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2010 AND t3.venuename = 'sigcse';
human
How many papers are there ?
assistant
SELECT DISTINCT COUNT ( DISTINCT paperid ) FROM paper;
human
how many papers are published in sigir ?
assistant
SELECT DISTINCT COUNT( t1.paperid ) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = "sigir" ;