CREATE TABLE writes (paperid INT, authorid INT)
CREATE TABLE paper (paperid INT, title VARCHAR, venueid INT, year INT, numciting INT, numcitedby INT, journalid INT)
CREATE TABLE field (fieldid INT)
CREATE TABLE venue (venueid INT, venuename VARCHAR)
CREATE TABLE cite (citingpaperid INT, citedpaperid INT)
CREATE TABLE author (authorid INT, authorname VARCHAR)
CREATE TABLE keyphrase (keyphraseid INT, keyphrasename VARCHAR)
CREATE TABLE paperfield (fieldid INT, paperid INT)
CREATE TABLE dataset (datasetid INT, datasetname VARCHAR)
CREATE TABLE journal (journalid INT, journalname VARCHAR)
CREATE TABLE paperdataset (paperid INT, datasetid INT)
CREATE TABLE paperkeyphrase (paperid INT, keyphraseid INT)

What are the best NLP conferences ?
SELECT DISTINCT COUNT(DISTINCT cite.citingpaperid), paper.venueid FROM cite, keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'NLP' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = cite.citedpaperid AND paper.paperid = paperkeyphrase.paperid GROUP BY paper.venueid ORDER BY COUNT(DISTINCT cite.citingpaperid) DESC
SELECT DISTINCT COUNT(DISTINCT "cite"."citingpaperid"), "paper"."venueid" FROM "cite" JOIN "paper" ON "cite"."citedpaperid" = "paper"."paperid" JOIN "paperkeyphrase" ON "paper"."paperid" = "paperkeyphrase"."paperid" JOIN "keyphrase" ON "keyphrase"."keyphraseid" = "paperkeyphrase"."keyphraseid" AND "keyphrase"."keyphrasename" = 'NLP' GROUP BY "paper"."venueid" ORDER BY COUNT(DISTINCT "cite"."citingpaperid") DESC NULLS LAST