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
Number of ACL papers with more than 2 citations
assistant
SELECT DISTINCT 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 = 'ACL' GROUP BY t3.citingpaperid HAVING COUNT ( DISTINCT t3.citedpaperid ) > 2;
human
how many ACL 2012 papers have more than 7 citations ?
assistant
SELECT DISTINCT ( t1.paperid ) , 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 t1.year = 2012 AND t2.venuename = 'ACL' GROUP BY t1.paperid HAVING COUNT ( t3.citingpaperid ) > 7;
human
which EMNLP 2010 papers have the most citations ?
assistant
SELECT DISTINCT t3.citedpaperid , COUNT ( t3.citedpaperid ) FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t1.year = 2010 AND t2.venuename = 'EMNLP' GROUP BY t3.citedpaperid ORDER BY COUNT ( t3.citedpaperid ) DESC;
human
what papers have fewer than 5 citations by ACL papers ?
assistant
SELECT DISTINCT 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 = 'ACL' GROUP BY t3.citingpaperid HAVING COUNT ( DISTINCT t3.citedpaperid ) < 5;
human
papers with at least 5 citations
assistant
SELECT DISTINCT t2.citingpaperid FROM paper AS t1 JOIN cite AS t2 ON t1.paperid = t2.citedpaperid GROUP BY t2.citingpaperid HAVING COUNT ( DISTINCT t2.citedpaperid ) >= 5;
human
papers with more than 10 citations
assistant
SELECT DISTINCT t2.citingpaperid FROM paper AS t1 JOIN cite AS t2 ON t1.paperid = t2.citedpaperid GROUP BY t2.citingpaperid HAVING COUNT( DISTINCT t2.citedpaperid ) > 10 ;