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
count of ACL papers by author
assistant
SELECT DISTINCT COUNT ( 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 = 'ACL' GROUP BY t1.authorid;
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;
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
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
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
ACL papers with less than 5 citations
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 ;