input
stringlengths
667
7.62k
output
stringlengths
41
600
db_id
stringlengths
3
31
query
stringlengths
18
577
question
stringlengths
3
224
schema
stringlengths
177
6.14k
primary_keys
stringlengths
16
545
foreign_keys
stringlengths
16
1.48k
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>How many citations does luke zettlemoyer have per year</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT COUNT ( t4.citedpaperid ) , t3.year FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = "luke zettlemoyer" GROUP BY t3.year;</SQL_QUERY>
scholar
SELECT DISTINCT COUNT ( t4.citedpaperid ) , t3.year FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = "luke zettlemoyer" GROUP BY t3.year;
How many citations does luke zettlemoyer have per year
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>authors working on ImageNet</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t2.paperid FROM paperdataset AS t3 JOIN dataset AS t1 ON t3.datasetid = t1.datasetid JOIN paper AS t4 ON t4.paperid = t3.paperid JOIN writes AS t2 ON t2.paperid = t4.paperid WHERE t1.datasetname = "ImageNet" GROUP BY t2.paperid;</SQL_QUERY>
scholar
SELECT DISTINCT t2.paperid FROM paperdataset AS t3 JOIN dataset AS t1 ON t3.datasetid = t1.datasetid JOIN paper AS t4 ON t4.paperid = t3.paperid JOIN writes AS t2 ON t2.paperid = t4.paperid WHERE t1.datasetname = "ImageNet" GROUP BY t2.paperid;
authors working on ImageNet
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>What articles have been published since 2006 about the effects of juicing for cancer patients ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT paperid , title FROM paper WHERE title LIKE "the effects of juicing for cancer patients" AND YEAR > 2006;</SQL_QUERY>
scholar
SELECT DISTINCT paperid , title FROM paper WHERE title LIKE "the effects of juicing for cancer patients" AND YEAR > 2006;
What articles have been published since 2006 about the effects of juicing for cancer patients ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>Eric C. Kerrigan 's Liquid Automatica paper</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t2.paperid FROM paperkeyphrase AS t5 JOIN keyphrase AS t3 ON t5.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t5.paperid JOIN paper AS t2 ON t4.paperid = t2.paperid JOIN author AS t1 ON t4.authorid = t1.authorid JOIN venue AS t6 ON t6.venueid = t2.venueid WHERE t1.authorname = "Eric C. Kerrigan" AND t3.keyphrasename = "Liquid" AND t6.venuename = "Automatica";</SQL_QUERY>
scholar
SELECT DISTINCT t2.paperid FROM paperkeyphrase AS t5 JOIN keyphrase AS t3 ON t5.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t5.paperid JOIN paper AS t2 ON t4.paperid = t2.paperid JOIN author AS t1 ON t4.authorid = t1.authorid JOIN venue AS t6 ON t6.venueid = t2.venueid WHERE t1.authorname = "Eric C. Kerrigan" AND t3.keyphrasename = "Liquid" AND t6.venuename = "Automatica";
Eric C. Kerrigan 's Liquid Automatica paper
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>Where did sergey levine publish his last paper ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t3.venueid , t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = "sergey levine" GROUP BY t3.venueid , t3.year ORDER BY t3.year DESC;</SQL_QUERY>
scholar
SELECT DISTINCT t3.venueid , t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = "sergey levine" GROUP BY t3.venueid , t3.year ORDER BY t3.year DESC;
Where did sergey levine publish his last paper ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>keyphrases used by dan klein in his emnlp papers</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t2.keyphraseid FROM paper AS t3 JOIN paperkeyphrase AS t2 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid JOIN writes AS t5 ON t5.paperid = t3.paperid JOIN author AS t1 ON t5.authorid = t1.authorid WHERE t1.authorname = "dan klein" AND t4.venuename = "emnlp";</SQL_QUERY>
scholar
SELECT DISTINCT t2.keyphraseid FROM paper AS t3 JOIN paperkeyphrase AS t2 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid JOIN writes AS t5 ON t5.paperid = t3.paperid JOIN author AS t1 ON t5.authorid = t1.authorid WHERE t1.authorname = "dan klein" AND t4.venuename = "emnlp";
keyphrases used by dan klein in his emnlp papers
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>Who are the prominent researchers in Neutralizing Antibody in 2012 ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "Neutralizing Antibody" AND t4.year = 2012 GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;</SQL_QUERY>
scholar
SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "Neutralizing Antibody" AND t4.year = 2012 GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
Who are the prominent researchers in Neutralizing Antibody in 2012 ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>the papers at eccv in 2014 using ImageNet dataset</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = "ImageNet" AND t3.year = 2014 AND t4.venuename = "eccv";</SQL_QUERY>
scholar
SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = "ImageNet" AND t3.year = 2014 AND t4.venuename = "eccv";
the papers at eccv in 2014 using ImageNet dataset
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>which papers in eccv 2014 use ImageNet ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = "ImageNet" AND t3.year = 2014 AND t4.venuename = "eccv";</SQL_QUERY>
scholar
SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = "ImageNet" AND t3.year = 2014 AND t4.venuename = "eccv";
which papers in eccv 2014 use ImageNet ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>eccv 2014 papers using ImageNet</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = "ImageNet" AND t3.year = 2014 AND t4.venuename = "eccv";</SQL_QUERY>
scholar
SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = "ImageNet" AND t3.year = 2014 AND t4.venuename = "eccv";
eccv 2014 papers using ImageNet
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>Euclidean Distance papers citing NIPS papers</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t5.citingpaperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN cite AS t5 ON t2.paperid = t5.citingpaperid JOIN paper AS t3 ON t3.paperid = t5.citedpaperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = "Euclidean Distance" AND t4.venuename = "NIPS";</SQL_QUERY>
scholar
SELECT DISTINCT t5.citingpaperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN cite AS t5 ON t2.paperid = t5.citingpaperid JOIN paper AS t3 ON t3.paperid = t5.citedpaperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = "Euclidean Distance" AND t4.venuename = "NIPS";
Euclidean Distance papers citing NIPS papers
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>top authors working on ImageNet ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT COUNT ( t4.paperid ) , t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t4 ON t4.paperid = t2.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t1.datasetname = "ImageNet" GROUP BY t3.paperid ORDER BY COUNT ( t4.paperid ) DESC;</SQL_QUERY>
scholar
SELECT DISTINCT COUNT ( t4.paperid ) , t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t4 ON t4.paperid = t2.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t1.datasetname = "ImageNet" GROUP BY t3.paperid ORDER BY COUNT ( t4.paperid ) DESC;
top authors working on ImageNet ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>how many ACL 2012 papers have more than 7 citations ?</question> [SQL]:
<SQL_QUERY>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;</SQL_QUERY>
scholar
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;
how many ACL 2012 papers have more than 7 citations ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>What was the topic of best paper in 2012 EMNLP-CoNLL ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT COUNT ( DISTINCT t4.citingpaperid ) , t1.keyphraseid , t2.paperid FROM paper AS t2 JOIN cite AS t4 ON t2.paperid = t4.citedpaperid JOIN paperkeyphrase AS t1 ON t2.paperid = t1.paperid JOIN venue AS t3 ON t3.venueid = t2.venueid WHERE t2.year = 2012 AND t3.venuename = "EMNLP-CoNLL" GROUP BY t2.paperid , t1.keyphraseid ORDER BY COUNT ( DISTINCT t4.citingpaperid ) DESC;</SQL_QUERY>
scholar
SELECT DISTINCT COUNT ( DISTINCT t4.citingpaperid ) , t1.keyphraseid , t2.paperid FROM paper AS t2 JOIN cite AS t4 ON t2.paperid = t4.citedpaperid JOIN paperkeyphrase AS t1 ON t2.paperid = t1.paperid JOIN venue AS t3 ON t3.venueid = t2.venueid WHERE t2.year = 2012 AND t3.venuename = "EMNLP-CoNLL" GROUP BY t2.paperid , t1.keyphraseid ORDER BY COUNT ( DISTINCT t4.citingpaperid ) DESC;
What was the topic of best paper in 2012 EMNLP-CoNLL ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>How many papers has Noah Smith co-authored since 2009 ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT COUNT ( DISTINCT t2.paperid ) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname != "Noah Smith" AND t3.year > 2009 AND t2.paperid IN ( SELECT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname LIKE "Noah Smith" );</SQL_QUERY>
scholar
SELECT DISTINCT COUNT ( DISTINCT t2.paperid ) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname != "Noah Smith" AND t3.year > 2009 AND t2.paperid IN ( SELECT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname LIKE "Noah Smith" );
How many papers has Noah Smith co-authored since 2009 ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>Number of ACL papers with more than 2 citations</question> [SQL]:
<SQL_QUERY>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;</SQL_QUERY>
scholar
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;
Number of ACL papers with more than 2 citations
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the name of Eric C. Kerrigan 's Liquid Automatica paper ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t2.title FROM paperkeyphrase AS t5 JOIN keyphrase AS t3 ON t5.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t5.paperid JOIN paper AS t2 ON t4.paperid = t2.paperid JOIN author AS t1 ON t4.authorid = t1.authorid JOIN venue AS t6 ON t6.venueid = t2.venueid WHERE t1.authorname LIKE "Eric C. Kerrigan" AND t3.keyphrasename = "Liquid" AND t6.venuename = "Automatica";</SQL_QUERY>
scholar
SELECT DISTINCT t2.title FROM paperkeyphrase AS t5 JOIN keyphrase AS t3 ON t5.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t5.paperid JOIN paper AS t2 ON t4.paperid = t2.paperid JOIN author AS t1 ON t4.authorid = t1.authorid JOIN venue AS t6 ON t6.venueid = t2.venueid WHERE t1.authorname LIKE "Eric C. Kerrigan" AND t3.keyphrasename = "Liquid" AND t6.venuename = "Automatica";
What is the name of Eric C. Kerrigan 's Liquid Automatica paper ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>How many papers used ImageNet datasets in cvpr ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT COUNT ( t3.paperid ) FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = "ImageNet" AND t4.venuename = "cvpr";</SQL_QUERY>
scholar
SELECT DISTINCT COUNT ( t3.paperid ) FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = "ImageNet" AND t4.venuename = "cvpr";
How many papers used ImageNet datasets in cvpr ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>What venues are for Neuroscience ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT venueid FROM venue WHERE venuename = "Neuroscience";</SQL_QUERY>
scholar
SELECT DISTINCT venueid FROM venue WHERE venuename = "Neuroscience";
What venues are for Neuroscience ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>When was the last time Mary Crainie published a paper ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT MAX ( t3.year ) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = "Mary Crainie";</SQL_QUERY>
scholar
SELECT DISTINCT MAX ( t3.year ) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = "Mary Crainie";
When was the last time Mary Crainie published a paper ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>I want the co-authors of papers on Machine Translation Output with Philipp Koehn</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t1.authorid FROM paperkeyphrase AS t6 JOIN keyphrase AS t3 ON t6.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t6.paperid JOIN writes AS t5 ON t5.paperid = t4.paperid JOIN author AS t1 ON t5.authorid = t1.authorid JOIN author AS t2 ON t4.authorid = t2.authorid WHERE t2.authorname = "Philipp Koehn" AND t3.keyphrasename = "Machine Translation Output";</SQL_QUERY>
scholar
SELECT DISTINCT t1.authorid FROM paperkeyphrase AS t6 JOIN keyphrase AS t3 ON t6.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t6.paperid JOIN writes AS t5 ON t5.paperid = t4.paperid JOIN author AS t1 ON t5.authorid = t1.authorid JOIN author AS t2 ON t4.authorid = t2.authorid WHERE t2.authorname = "Philipp Koehn" AND t3.keyphrasename = "Machine Translation Output";
I want the co-authors of papers on Machine Translation Output with Philipp Koehn
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>How many papers does Samuel Madden publish outside of PVLDB area ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT COUNT ( DISTINCT t3.paperid ) FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = "Samuel Madden" AND t4.venuename != "PVLDB";</SQL_QUERY>
scholar
SELECT DISTINCT COUNT ( DISTINCT t3.paperid ) FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = "Samuel Madden" AND t4.venuename != "PVLDB";
How many papers does Samuel Madden publish outside of PVLDB area ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>which journal did Donald E Knuth publish his last paper ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t3.journalid , t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = "Donald E Knuth" GROUP BY t3.journalid , t3.year ORDER BY t3.year DESC;</SQL_QUERY>
scholar
SELECT DISTINCT t3.journalid , t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = "Donald E Knuth" GROUP BY t3.journalid , t3.year ORDER BY t3.year DESC;
which journal did Donald E Knuth publish his last paper ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the venue of Fracture of acrylic bone cement ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT venueid FROM paper WHERE title = "Fracture of acrylic bone cement";</SQL_QUERY>
scholar
SELECT DISTINCT venueid FROM paper WHERE title = "Fracture of acrylic bone cement";
What is the venue of Fracture of acrylic bone cement ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>How many authors published at sigcse in 2010 ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT COUNT ( t2.paperid ) FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2010 AND t3.venuename = "sigcse";</SQL_QUERY>
scholar
SELECT DISTINCT COUNT ( t2.paperid ) FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2010 AND t3.venuename = "sigcse";
How many authors published at sigcse in 2010 ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the year of publication of " A Switching Architecture For ISDN " ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT title , YEAR FROM paper WHERE title = "A Switching Architecture For ISDN";</SQL_QUERY>
scholar
SELECT DISTINCT title , YEAR FROM paper WHERE title = "A Switching Architecture For ISDN";
What is the year of publication of " A Switching Architecture For ISDN " ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>what keywords are used by papers at uist</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t4.venuename = "uist";</SQL_QUERY>
scholar
SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t4.venuename = "uist";
what keywords are used by papers at uist
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>Give me the papers written by Su-In Lee before 2012 .</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = "Su-In Lee" AND t3.year < 2012;</SQL_QUERY>
scholar
SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = "Su-In Lee" AND t3.year < 2012;
Give me the papers written by Su-In Lee before 2012 .
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>papers in semantic parsing for each year</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT COUNT ( t3.paperid ) , t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = "semantic parsing" GROUP BY t3.year ORDER BY t3.year DESC;</SQL_QUERY>
scholar
SELECT DISTINCT COUNT ( t3.paperid ) , t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = "semantic parsing" GROUP BY t3.year ORDER BY t3.year DESC;
papers in semantic parsing for each year
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>papers with at least 5 citations</question> [SQL]:
<SQL_QUERY>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;</SQL_QUERY>
scholar
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;
papers with at least 5 citations
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>papers cited by at least 5 papers</question> [SQL]:
<SQL_QUERY>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;</SQL_QUERY>
scholar
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;
papers cited by at least 5 papers
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the most cited paper at sigcomm ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t3.citedpaperid , 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 = "sigcomm" GROUP BY t3.citedpaperid ORDER BY COUNT ( t3.citingpaperid ) DESC;</SQL_QUERY>
scholar
SELECT DISTINCT t3.citedpaperid , 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 = "sigcomm" GROUP BY t3.citedpaperid ORDER BY COUNT ( t3.citingpaperid ) DESC;
What is the most cited paper at sigcomm ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);</schema>" <primary_keys>[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid</primary_keys>" <foreign_keys>[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the name of Ranjit Jhala 's Liquid Haskell paper ?</question> [SQL]:
<SQL_QUERY>SELECT DISTINCT t3.title FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN writes AS t4 ON t4.paperid = t2.paperid JOIN paper AS t3 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname LIKE "Ranjit Jhala" AND t5.keyphrasename = "Liquid Haskell";</SQL_QUERY>
scholar
SELECT DISTINCT t3.title FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN writes AS t4 ON t4.paperid = t2.paperid JOIN paper AS t3 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname LIKE "Ranjit Jhala" AND t5.keyphrasename = "Liquid Haskell";
What is the name of Ranjit Jhala 's Liquid Haskell paper ?
[Schema (values) (types)]: | scholar | venue : venueid (text) , venuename (number) | author : authorid (text) , authorname (number) | dataset : datasetid (text) , datasetname (number) | journal : journalid (text) , journalname (number) | keyphrase : keyphraseid (text) , keyphrasename (number) | paper : paperid (text) , title (number) , venueid (text) , year (number) , numciting (text) , numcitedby (number) , journalid (text) | cite : citingpaperid (text) , citedpaperid (number) | paperDataset : paperid (text) , datasetid (number) | paperKeyphrase : paperid (text) , keyphraseid (number) | writes : paperid (text) , authorid (number);
[Primary Keys]: venue : venueid, author : authorid, dataset : datasetid, journal : journalid, keyphrase : keyphraseid, paper : paperid, cite : citingpaperid, paperdataset : datasetid, paperkeyphrase : keyphraseid, writes : paperid
[Foreign Keys]: paper : venueid = venue : venueid | paper : journalid = journal : journalid | cite : citingpaperid = paper : paperid | cite : citedpaperid = paper : paperid | paperkeyphrase : keyphraseid = keyphrase : keyphraseid | paperkeyphrase : paperid = paper : paperid | writes : authorid = author : authorid | writes : paperid = paper : paperid
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all the businesses with more than 4.5 stars</question> [SQL]:
<SQL_QUERY>SELECT name FROM business WHERE rating > 4.5;</SQL_QUERY>
yelp
SELECT name FROM business WHERE rating > 4.5;
List all the businesses with more than 4.5 stars
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all businesses with rating 3.5</question> [SQL]:
<SQL_QUERY>SELECT name FROM business WHERE rating = 3.5;</SQL_QUERY>
yelp
SELECT name FROM business WHERE rating = 3.5;
List all businesses with rating 3.5
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all user ids with name Michelle</question> [SQL]:
<SQL_QUERY>SELECT user_id FROM USER WHERE name = "Michelle";</SQL_QUERY>
yelp
SELECT user_id FROM USER WHERE name = "Michelle";
List all user ids with name Michelle
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all states in which there is a Whataburger</question> [SQL]:
<SQL_QUERY>SELECT state FROM business WHERE name = "Whataburger";</SQL_QUERY>
yelp
SELECT state FROM business WHERE name = "Whataburger";
Find all states in which there is a Whataburger
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all cities in which there is a restaurant called " MGM Grand Buffet "</question> [SQL]:
<SQL_QUERY>SELECT t1.city FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "MGM Grand Buffet" AND t2.category_name = "category_category_name0";</SQL_QUERY>
yelp
SELECT t1.city FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "MGM Grand Buffet" AND t2.category_name = "category_category_name0";
Find all cities in which there is a restaurant called " MGM Grand Buffet "
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find the cities of businesses rated below 1.5</question> [SQL]:
<SQL_QUERY>SELECT city FROM business WHERE rating < 1.5;</SQL_QUERY>
yelp
SELECT city FROM business WHERE rating < 1.5;
Find the cities of businesses rated below 1.5
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all cities which has a " Taj Mahal " .</question> [SQL]:
<SQL_QUERY>SELECT city FROM business WHERE name = "Taj Mahal";</SQL_QUERY>
yelp
SELECT city FROM business WHERE name = "Taj Mahal";
Find all cities which has a " Taj Mahal " .
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all the reviews which rated a business less than 1</question> [SQL]:
<SQL_QUERY>SELECT text FROM review WHERE rating < 1;</SQL_QUERY>
yelp
SELECT text FROM review WHERE rating < 1;
List all the reviews which rated a business less than 1
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all the restaurant rated more than 3.5</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.rating > 3.5 AND t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.rating > 3.5 AND t2.category_name = "restaurant";
List all the restaurant rated more than 3.5
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>find all cities which has a " Taj Mahal " restaurant</question> [SQL]:
<SQL_QUERY>SELECT t1.city FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Taj Mahal" AND t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.city FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Taj Mahal" AND t2.category_name = "restaurant";
find all cities which has a " Taj Mahal " restaurant
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>list all the reviews by Niloofar</question> [SQL]:
<SQL_QUERY>SELECT t1.text FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t2.name = "Niloofar";</SQL_QUERY>
yelp
SELECT t1.text FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t2.name = "Niloofar";
list all the reviews by Niloofar
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>list all the businesses which have a review by Niloofar</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t3.name = "Niloofar";</SQL_QUERY>
yelp
SELECT t1.name FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t3.name = "Niloofar";
list all the businesses which have a review by Niloofar
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>list all the businesses which Niloofar rated 5</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t2.rating = 5 AND t3.name = "Niloofar";</SQL_QUERY>
yelp
SELECT t1.name FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t2.rating = 5 AND t3.name = "Niloofar";
list all the businesses which Niloofar rated 5
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all the reviews by Michelle for Italian restaurant</question> [SQL]:
<SQL_QUERY>SELECT t4.text FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN review AS t4 ON t4.business_id = t1.business_id JOIN USER AS t5 ON t5.user_id = t4.user_id WHERE t2.category_name = "Italian" AND t3.category_name = "category_category_name1" AND t5.name = "Michelle";</SQL_QUERY>
yelp
SELECT t4.text FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN review AS t4 ON t4.business_id = t1.business_id JOIN USER AS t5 ON t5.user_id = t4.user_id WHERE t2.category_name = "Italian" AND t3.category_name = "category_category_name1" AND t5.name = "Michelle";
List all the reviews by Michelle for Italian restaurant
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>find the number of reviews written for " Cafe Zinho " restaurant in Texas</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT t3.text ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id WHERE t1.name = "Cafe Zinho" AND t1.state = "Texas" AND t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT t3.text ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id WHERE t1.name = "Cafe Zinho" AND t1.state = "Texas" AND t2.category_name = "restaurant";
find the number of reviews written for " Cafe Zinho " restaurant in Texas
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all 5 star Italian restaurant</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.rating = 5 AND t2.category_name = "Italian" AND t3.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.rating = 5 AND t2.category_name = "Italian" AND t3.category_name = "restaurant";
List all 5 star Italian restaurant
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all the neighbourhoods with Italian restaurant in Madison</question> [SQL]:
<SQL_QUERY>SELECT t1.neighbourhood_name FROM category AS t3 JOIN business AS t2 ON t3.business_id = t2.business_id JOIN category AS t4 ON t4.business_id = t2.business_id JOIN neighbourhood AS t1 ON t1.business_id = t2.business_id WHERE t2.city = "Madison" AND t3.category_name = "Italian" AND t4.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.neighbourhood_name FROM category AS t3 JOIN business AS t2 ON t3.business_id = t2.business_id JOIN category AS t4 ON t4.business_id = t2.business_id JOIN neighbourhood AS t1 ON t1.business_id = t2.business_id WHERE t2.city = "Madison" AND t3.category_name = "Italian" AND t4.category_name = "restaurant";
List all the neighbourhoods with Italian restaurant in Madison
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all the neighbourhoods with Italian restaurant rated less than 2.5 in Madison</question> [SQL]:
<SQL_QUERY>SELECT t1.neighbourhood_name FROM category AS t3 JOIN business AS t2 ON t3.business_id = t2.business_id JOIN category AS t4 ON t4.business_id = t2.business_id JOIN neighbourhood AS t1 ON t1.business_id = t2.business_id WHERE t2.city = "Madison" AND t2.rating < 2.5 AND t3.category_name = "Italian" AND t4.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.neighbourhood_name FROM category AS t3 JOIN business AS t2 ON t3.business_id = t2.business_id JOIN category AS t4 ON t4.business_id = t2.business_id JOIN neighbourhood AS t1 ON t1.business_id = t2.business_id WHERE t2.city = "Madison" AND t2.rating < 2.5 AND t3.category_name = "Italian" AND t4.category_name = "restaurant";
List all the neighbourhoods with Italian restaurant rated less than 2.5 in Madison
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>find all the restaurant in Pennsylvania</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.state = "Pennsylvania" AND t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.state = "Pennsylvania" AND t2.category_name = "restaurant";
find all the restaurant in Pennsylvania
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all businesses that are restaurant in Pennsylvania .</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.state = "Pennsylvania" AND t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.state = "Pennsylvania" AND t2.category_name = "restaurant";
List all businesses that are restaurant in Pennsylvania .
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all the reviews for all Pet Groomers with more than 100 reviews</question> [SQL]:
<SQL_QUERY>SELECT t3.text FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id WHERE t1.review_count > 100 AND t2.category_name = "Pet Groomers";</SQL_QUERY>
yelp
SELECT t3.text FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id WHERE t1.review_count > 100 AND t2.category_name = "Pet Groomers";
Find all the reviews for all Pet Groomers with more than 100 reviews
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What are all the breweries in " Los Angeles " ?</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "breweries";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "breweries";
What are all the breweries in " Los Angeles " ?
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all breweries in Los Angeles</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "breweries";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "breweries";
Find all breweries in Los Angeles
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all breweries in " Los Angeles "</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "breweries";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "breweries";
Find all breweries in " Los Angeles "
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all users who reviewed restaurant " Mesa Grill "</question> [SQL]:
<SQL_QUERY>SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.name = "Mesa Grill" AND t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.name = "Mesa Grill" AND t2.category_name = "restaurant";
Find all users who reviewed restaurant " Mesa Grill "
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List the addresses of all Walmart in " Los Angeles "</question> [SQL]:
<SQL_QUERY>SELECT full_address FROM business WHERE city = "Los Angeles" AND name = "Walmart";</SQL_QUERY>
yelp
SELECT full_address FROM business WHERE city = "Los Angeles" AND name = "Walmart";
List the addresses of all Walmart in " Los Angeles "
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all restaurant reviewed by Patrick in " Dallas "</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.city = "Dallas" AND t2.category_name = "restaurant" AND t4.name = "Patrick";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.city = "Dallas" AND t2.category_name = "restaurant" AND t4.name = "Patrick";
Find all restaurant reviewed by Patrick in " Dallas "
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Which restaurant in Dallas were reviewed by user Patrick ?</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.city = "Dallas" AND t2.category_name = "restaurant" AND t4.name = "Patrick";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.city = "Dallas" AND t2.category_name = "restaurant" AND t4.name = "Patrick";
Which restaurant in Dallas were reviewed by user Patrick ?
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all Bars reviewed by Patrick</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = "Bars" AND t4.name = "Patrick";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = "Bars" AND t4.name = "Patrick";
Find all Bars reviewed by Patrick
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all Bars reviewed by Patrick with at least 3 stars</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.rating >= 3 AND t2.category_name = "Bars" AND t4.name = "Patrick";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.rating >= 3 AND t2.category_name = "Bars" AND t4.name = "Patrick";
Find all Bars reviewed by Patrick with at least 3 stars
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all users who have written tips for " Barrio Cafe " in 2015</question> [SQL]:
<SQL_QUERY>SELECT t3.name FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t1.name = "Barrio Cafe" AND t2.year = 2015;</SQL_QUERY>
yelp
SELECT t3.name FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t1.name = "Barrio Cafe" AND t2.year = 2015;
Find all users who have written tips for " Barrio Cafe " in 2015
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all businesses in Texas with a rating below 2</question> [SQL]:
<SQL_QUERY>SELECT name FROM business WHERE rating < 2 AND state = "Texas";</SQL_QUERY>
yelp
SELECT name FROM business WHERE rating < 2 AND state = "Texas";
Find all businesses in Texas with a rating below 2
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all restaurant Seafood in Los Angeles</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Seafood" AND t3.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Seafood" AND t3.category_name = "restaurant";
Find all restaurant Seafood in Los Angeles
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all the Seafood restaurant in " Los Angeles "</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Seafood" AND t3.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Seafood" AND t3.category_name = "restaurant";
List all the Seafood restaurant in " Los Angeles "
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all restaurant that serve Seafood in " Los Angeles "</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Seafood" AND t3.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Seafood" AND t3.category_name = "restaurant";
Find all restaurant that serve Seafood in " Los Angeles "
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all reviews by Patrick with a rating above 4</question> [SQL]:
<SQL_QUERY>SELECT t1.text FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t1.rating > 4 AND t2.name = "Patrick";</SQL_QUERY>
yelp
SELECT t1.text FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t1.rating > 4 AND t2.name = "Patrick";
Find all reviews by Patrick with a rating above 4
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all Apple Store in " Los Angeles "</question> [SQL]:
<SQL_QUERY>SELECT business_id FROM business WHERE city = "Los Angeles" AND name = "Apple Store";</SQL_QUERY>
yelp
SELECT business_id FROM business WHERE city = "Los Angeles" AND name = "Apple Store";
Find all Apple Store in " Los Angeles "
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all Dallas restaurant with a rating above 4.5</question> [SQL]:
<SQL_QUERY>SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Dallas" AND t1.rating > 4.5 AND t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Dallas" AND t1.rating > 4.5 AND t2.category_name = "restaurant";
Find all Dallas restaurant with a rating above 4.5
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What neighbourhood is restaurant " Flat Top Grill " in ?</question> [SQL]:
<SQL_QUERY>SELECT t1.neighbourhood_name FROM category AS t3 JOIN business AS t2 ON t3.business_id = t2.business_id JOIN neighbourhood AS t1 ON t1.business_id = t2.business_id WHERE t2.name = "Flat Top Grill" AND t3.category_name = "category_category_name0";</SQL_QUERY>
yelp
SELECT t1.neighbourhood_name FROM category AS t3 JOIN business AS t2 ON t3.business_id = t2.business_id JOIN neighbourhood AS t1 ON t1.business_id = t2.business_id WHERE t2.name = "Flat Top Grill" AND t3.category_name = "category_category_name0";
What neighbourhood is restaurant " Flat Top Grill " in ?
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all tips about " Vintner Grill " that received more than 9 likes</question> [SQL]:
<SQL_QUERY>SELECT t2.text FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Vintner Grill" AND t2.likes > 9;</SQL_QUERY>
yelp
SELECT t2.text FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Vintner Grill" AND t2.likes > 9;
Find all tips about " Vintner Grill " that received more than 9 likes
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all reviews about " Kabob Palace " in year 2014</question> [SQL]:
<SQL_QUERY>SELECT t2.text FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Kabob Palace" AND t2.year = 2014;</SQL_QUERY>
yelp
SELECT t2.text FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Kabob Palace" AND t2.year = 2014;
Find all reviews about " Kabob Palace " in year 2014
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all users who have written tips about businesses in Dallas</question> [SQL]:
<SQL_QUERY>SELECT t3.name FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t1.city = "Dallas";</SQL_QUERY>
yelp
SELECT t3.name FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t1.city = "Dallas";
Find all users who have written tips about businesses in Dallas
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all cities in Texas in which there is a restaurant called " MGM Grand Buffet "</question> [SQL]:
<SQL_QUERY>SELECT t1.city FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "MGM Grand Buffet" AND t1.state = "Texas" AND t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t1.city FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "MGM Grand Buffet" AND t1.state = "Texas" AND t2.category_name = "restaurant";
Find all cities in Texas in which there is a restaurant called " MGM Grand Buffet "
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find the users who have given tips on Pet Groomers</question> [SQL]:
<SQL_QUERY>SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN tip AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = "Pet Groomers";</SQL_QUERY>
yelp
SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN tip AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = "Pet Groomers";
Find the users who have given tips on Pet Groomers
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all tips for " Cafe Zinho " in Texas .</question> [SQL]:
<SQL_QUERY>SELECT t2.text FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Cafe Zinho" AND t1.state = "Texas";</SQL_QUERY>
yelp
SELECT t2.text FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Cafe Zinho" AND t1.state = "Texas";
Find all tips for " Cafe Zinho " in Texas .
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all users who reviewed businesses that are restaurant .</question> [SQL]:
<SQL_QUERY>SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = "restaurant";
List all users who reviewed businesses that are restaurant .
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all tips for " Cafe Zinho " in Pennsylvania in 2010 .</question> [SQL]:
<SQL_QUERY>SELECT t2.text FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Cafe Zinho" AND t1.state = "Pennsylvania" AND t2.year = 2010;</SQL_QUERY>
yelp
SELECT t2.text FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Cafe Zinho" AND t1.state = "Pennsylvania" AND t2.year = 2010;
List all tips for " Cafe Zinho " in Pennsylvania in 2010 .
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>List all users who reviewed businesses that are restaurant in 2010 .</question> [SQL]:
<SQL_QUERY>SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = "restaurant" AND t3.year = 2010;</SQL_QUERY>
yelp
SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = "restaurant" AND t3.year = 2010;
List all users who reviewed businesses that are restaurant in 2010 .
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all the tips from a user who has written a review in 2012</question> [SQL]:
<SQL_QUERY>SELECT t2.text FROM USER AS t3 JOIN review AS t1 ON t3.user_id = t1.user_id JOIN tip AS t2 ON t3.user_id = t2.user_id WHERE t1.year = 2012;</SQL_QUERY>
yelp
SELECT t2.text FROM USER AS t3 JOIN review AS t1 ON t3.user_id = t1.user_id JOIN tip AS t2 ON t3.user_id = t2.user_id WHERE t1.year = 2012;
Find all the tips from a user who has written a review in 2012
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>Find all reviews for businesses rated 2.5</question> [SQL]:
<SQL_QUERY>SELECT t2.text FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.rating = 2.5;</SQL_QUERY>
yelp
SELECT t2.text FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.rating = 2.5;
Find all reviews for businesses rated 2.5
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>find the number of escape games in Madison</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";
find the number of escape games in Madison
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the number of escape games in Madison</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";
What is the number of escape games in Madison
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>How many escape games exist in Madison</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";
How many escape games exist in Madison
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the number of escape games in " Madison " ?</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";
What is the number of escape games in " Madison " ?
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>How many escape games are there in Madison ?</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Madison" AND t2.category_name = "escape games";
How many escape games are there in Madison ?
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>find the number of restaurant rated more than 3.5</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.rating > 3.5 AND t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.rating > 3.5 AND t2.category_name = "restaurant";
find the number of restaurant rated more than 3.5
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>find the total checkins in Moroccan restaurant in " Los Angeles "</question> [SQL]:
<SQL_QUERY>SELECT SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "restaurant" AND t3.category_name = "Moroccan";</SQL_QUERY>
yelp
SELECT SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "restaurant" AND t3.category_name = "Moroccan";
find the total checkins in Moroccan restaurant in " Los Angeles "
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>find the total checkins in Moroccan restaurant in " Los Angeles " on Friday</question> [SQL]:
<SQL_QUERY>SELECT SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Moroccan" AND t3.category_name = "restaurant" AND t4.day = "Friday";</SQL_QUERY>
yelp
SELECT SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Moroccan" AND t3.category_name = "restaurant" AND t4.day = "Friday";
find the total checkins in Moroccan restaurant in " Los Angeles " on Friday
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>find the total checkins in Moroccan restaurant in " Los Angeles " per day</question> [SQL]:
<SQL_QUERY>SELECT t4.day , SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Moroccan" AND t3.category_name = "restaurant" GROUP BY t4.day;</SQL_QUERY>
yelp
SELECT t4.day , SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = "Los Angeles" AND t2.category_name = "Moroccan" AND t3.category_name = "restaurant" GROUP BY t4.day;
find the total checkins in Moroccan restaurant in " Los Angeles " per day
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>find the total checkins in Italian Delis in each state on Sunday</question> [SQL]:
<SQL_QUERY>SELECT t1.state , SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t2.category_name = "Italian" AND t3.category_name = "Delis" AND t4.day = "Sunday" GROUP BY t1.state;</SQL_QUERY>
yelp
SELECT t1.state , SUM ( t4.count ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t2.category_name = "Italian" AND t3.category_name = "Delis" AND t4.day = "Sunday" GROUP BY t1.state;
find the total checkins in Italian Delis in each state on Sunday
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>How many reviews has Niloofar written in 2015</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT t1.text ) FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t1.year = 2015 AND t2.name = "Niloofar";</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT t1.text ) FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t1.year = 2015 AND t2.name = "Niloofar";
How many reviews has Niloofar written in 2015
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>what is the average rating given in Michelle reviews</question> [SQL]:
<SQL_QUERY>SELECT AVG ( t1.rating ) FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t2.name = "Michelle";</SQL_QUERY>
yelp
SELECT AVG ( t1.rating ) FROM USER AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t2.name = "Michelle";
what is the average rating given in Michelle reviews
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the number of checkins for " Cafe Zinho " on Friday</question> [SQL]:
<SQL_QUERY>SELECT t2.count FROM checkin AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Cafe Zinho" AND t2.day = "Friday";</SQL_QUERY>
yelp
SELECT t2.count FROM checkin AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = "Cafe Zinho" AND t2.day = "Friday";
What is the number of checkins for " Cafe Zinho " on Friday
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>how many users reviewed " Sushi Too " in Pittsburgh</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT t3.name ) FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t1.city = "Pittsburgh" AND t1.name = "Sushi Too";</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT t3.name ) FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN USER AS t3 ON t3.user_id = t2.user_id WHERE t1.city = "Pittsburgh" AND t1.name = "Sushi Too";
how many users reviewed " Sushi Too " in Pittsburgh
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the number of restaurant in Pittsburgh rated 4.5</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Pittsburgh" AND t1.rating = 4.5 AND t2.category_name = "restaurant";</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT t1.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = "Pittsburgh" AND t1.rating = 4.5 AND t2.category_name = "restaurant";
What is the number of restaurant in Pittsburgh rated 4.5
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>How many tips have been written in 2015</question> [SQL]:
<SQL_QUERY>SELECT COUNT ( DISTINCT text ) FROM tip WHERE YEAR = 2015;</SQL_QUERY>
yelp
SELECT COUNT ( DISTINCT text ) FROM tip WHERE YEAR = 2015;
How many tips have been written in 2015
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite. <schema>[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);</schema>" <primary_keys>[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id</primary_keys>" <foreign_keys>[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id</foreign_keys>" Answer the following question with a SQL Statement:<question>What is the total likes on tips from Niloofar</question> [SQL]:
<SQL_QUERY>SELECT SUM ( t1.likes ) FROM USER AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t2.name = "Niloofar";</SQL_QUERY>
yelp
SELECT SUM ( t1.likes ) FROM USER AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t2.name = "Niloofar";
What is the total likes on tips from Niloofar
[Schema (values) (types)]: | yelp | business : bid (text) , business_id (number) , name (text) , full_address (text) , city (text) , latitude (text) , longitude (text) , review_count (text) , is_open (number) , rating (number) , state (number) | category : id (text) , business_id (number) , category_name (text) | user : uid (text) , user_id (number) , name (text) | checkin : cid (text) , business_id (number) , count (text) , day (text) | neighbourhood : id (text) , business_id (number) , neighbourhood_name (text) | review : rid (text) , business_id (number) , user_id (text) , rating (text) , text (text) , year (text) , month (text) | tip : tip_id (text) , business_id (number) , text (text) , user_id (text) , likes (text) , year (text) , month (text);
[Primary Keys]: business : bid, category : id, user : uid, checkin : cid, neighbourhood : id, review : rid, tip : tip_id
[Foreign Keys]: category : business_id = business : business_id | checkin : business_id = business : business_id | neighbourhood : business_id = business : business_id | review : user_id = user : user_id | review : business_id = business : business_id | tip : user_id = user : user_id | tip : business_id = business : business_id