human
Schema:
author (aid, homepage, name, oid)
conference (cid, homepage, name)
domain (did, name)
domain_author (aid, did)
domain_conference (cid, did)
journal (homepage, jid, name)
domain_journal (did, jid)
keyword (keyword, kid)
domain_keyword (did, kid)
publication (abstract, cid, citation_num, jid, pid, reference_num, title, year)
domain_publication (did, pid)
organization (continent, homepage, name, oid)
publication_keyword (pid, kid)
writes (aid, pid)
cite (cited, citing)
Please answer with SQL.
assistant
Sure, I understand.
human
return me the keyword, which have been contained by the most number of papers in VLDB conference .
assistant
SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t2.name = 'VLDB' GROUP BY t1.keyword ORDER BY COUNT ( DISTINCT t3.title ) DESC LIMIT 1;
human
return me the number of papers in PVLDB containing keyword ' Keyword search ' .
assistant
SELECT COUNT ( DISTINCT t4.title ) FROM publication_keyword AS t2 JOIN keyword AS t1 ON t2.kid = t1.kid JOIN publication AS t4 ON t4.pid = t2.pid JOIN journal AS t3 ON t4.jid = t3.jid WHERE t3.name = 'PVLDB' AND t1.keyword = 'Keyword search';
human
return me the keywords, which have been contained by more than 100 papers in VLDB conference .
assistant
SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t2.name = 'VLDB' GROUP BY t1.keyword HAVING COUNT ( DISTINCT t3.title ) > 100;
human
return me the papers in PVLDB containing keyword ' Keyword search ' .
assistant
SELECT t4.title FROM publication_keyword AS t2 JOIN keyword AS t1 ON t2.kid = t1.kid JOIN publication AS t4 ON t4.pid = t2.pid JOIN journal AS t3 ON t4.jid = t3.jid WHERE t3.name = 'PVLDB' AND t1.keyword = 'Keyword search';
human
return me the keyword, which have been contained by the most number of papers in PVLDB .
assistant
SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t3.name = 'PVLDB' GROUP BY t1.keyword ORDER BY COUNT ( DISTINCT t2.title ) DESC LIMIT 1;
human
return me the keywords, which have been contained by more than 100 papers in PVLDB .
assistant
SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t3.name = "PVLDB" GROUP BY t1.keyword HAVING COUNT( DISTINCT t2.title ) > 100 ;