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 number of researchers in Databases area in ' University of Michigan ' .
assistant
SELECT COUNT ( DISTINCT t1.name ) FROM domain_author AS t4 JOIN author AS t1 ON t4.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t4.did JOIN organization AS t2 ON t2.oid = t1.oid WHERE t3.name = 'Databases' AND t2.name = 'University of Michigan';
human
return me the keywords in the papers of ' University of Michigan ' .
assistant
SELECT t1.keyword FROM organization AS t6 JOIN author AS t2 ON t6.oid = t2.oid JOIN writes AS t4 ON t4.aid = t2.aid JOIN publication AS t5 ON t4.pid = t5.pid JOIN publication_keyword AS t3 ON t5.pid = t3.pid JOIN keyword AS t1 ON t3.kid = t1.kid WHERE t6.name = 'University of Michigan';
human
return me all the papers in ' University of Michigan ' .
assistant
SELECT t4.title FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = 'University of Michigan';
human
return me all the researchers in Databases area in ' University of Michigan ' .
assistant
SELECT t1.name FROM domain_author AS t4 JOIN author AS t1 ON t4.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t4.did JOIN organization AS t2 ON t2.oid = t1.oid WHERE t3.name = 'Databases' AND t2.name = 'University of Michigan';
human
return me the number of researchers in ' University of Michigan ' .
assistant
SELECT COUNT ( DISTINCT t1.name ) FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid WHERE t2.name = 'University of Michigan';
human
return me all the researchers in ' University of Michigan ' .
assistant
SELECT t1.name FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid WHERE t2.name = "University of Michigan" ;