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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name of all students who were in the tryout sorted in alphabetic order.</question>
[SQL]:
| <SQL_QUERY>SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName</SQL_QUERY> | soccer_2 | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName | Find the name of all students who were in the tryout sorted in alphabetic order. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all students who tried out in alphabetical order?</question>
[SQL]:
| <SQL_QUERY>SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName</SQL_QUERY> | soccer_2 | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName | What are the names of all students who tried out in alphabetical order? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name and hours of the students whose tryout decision is yes.</question>
[SQL]:
| <SQL_QUERY>SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'</SQL_QUERY> | soccer_2 | SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' | Find the name and hours of the students whose tryout decision is yes. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names and hours spent practicing of every student who received a yes at tryouts?</question>
[SQL]:
| <SQL_QUERY>SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'</SQL_QUERY> | soccer_2 | SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' | What are the names and hours spent practicing of every student who received a yes at tryouts? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the states of the colleges that have students in the tryout who played in striker position.</question>
[SQL]:
| <SQL_QUERY>SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'</SQL_QUERY> | soccer_2 | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker' | Find the states of the colleges that have students in the tryout who played in striker position. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the states of the colleges where students who tried out for the striker position attend?</question>
[SQL]:
| <SQL_QUERY>SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'</SQL_QUERY> | soccer_2 | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker' | What are the states of the colleges where students who tried out for the striker position attend? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the names of the students who are in the position of striker and got a yes tryout decision.</question>
[SQL]:
| <SQL_QUERY>SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'</SQL_QUERY> | soccer_2 | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker' | Find the names of the students who are in the position of striker and got a yes tryout decision. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all students who successfully tried out for the position of striker?</question>
[SQL]:
| <SQL_QUERY>SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'</SQL_QUERY> | soccer_2 | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker' | What are the names of all students who successfully tried out for the position of striker? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the state of the college which player Charles is attending.</question>
[SQL]:
| <SQL_QUERY>SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'</SQL_QUERY> | soccer_2 | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles' | Find the state of the college which player Charles is attending. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>In which state is the college that Charles attends?</question>
[SQL]:
| <SQL_QUERY>SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'</SQL_QUERY> | soccer_2 | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles' | In which state is the college that Charles attends? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the average and maximum hours for the students whose tryout decision is yes.</question>
[SQL]:
| <SQL_QUERY>SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'</SQL_QUERY> | soccer_2 | SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' | Find the average and maximum hours for the students whose tryout decision is yes. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the average and maximum number of hours students who made the team practiced?</question>
[SQL]:
| <SQL_QUERY>SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'</SQL_QUERY> | soccer_2 | SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' | What is the average and maximum number of hours students who made the team practiced? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the average hours for the students whose tryout decision is no.</question>
[SQL]:
| <SQL_QUERY>SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'</SQL_QUERY> | soccer_2 | SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no' | Find the average hours for the students whose tryout decision is no. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the average number of hours spent practicing for students who got rejected?</question>
[SQL]:
| <SQL_QUERY>SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'</SQL_QUERY> | soccer_2 | SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no' | What is the average number of hours spent practicing for students who got rejected? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?</question>
[SQL]:
| <SQL_QUERY>SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos</SQL_QUERY> | soccer_2 | SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos | What is the maximum training hours for the students whose training hours is greater than 1000 in different positions? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>For each position, what is the maximum number of hours for students who spent more than 1000 hours training?</question>
[SQL]:
| <SQL_QUERY>SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos</SQL_QUERY> | soccer_2 | SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos | For each position, what is the maximum number of hours for students who spent more than 1000 hours training? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which colleges do the tryout players whose name starts with letter D go to?</question>
[SQL]:
| <SQL_QUERY>SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'</SQL_QUERY> | soccer_2 | SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%' | Which colleges do the tryout players whose name starts with letter D go to? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which colleges does each player with a name that starts with the letter D who tried out go to?</question>
[SQL]:
| <SQL_QUERY>SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'</SQL_QUERY> | soccer_2 | SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%' | Which colleges does each player with a name that starts with the letter D who tried out go to? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which college has any student who is a goalie and succeeded in the tryout.</question>
[SQL]:
| <SQL_QUERY>SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'</SQL_QUERY> | soccer_2 | SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie' | Which college has any student who is a goalie and succeeded in the tryout. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What college has a student who successfully made the team in the role of a goalie?</question>
[SQL]:
| <SQL_QUERY>SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'</SQL_QUERY> | soccer_2 | SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie' | What college has a student who successfully made the team in the role of a goalie? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name of the tryout players who are from the college with largest size.</question>
[SQL]:
| <SQL_QUERY>SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)</SQL_QUERY> | soccer_2 | SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1) | Find the name of the tryout players who are from the college with largest size. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all tryout participants who are from the largest college?</question>
[SQL]:
| <SQL_QUERY>SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)</SQL_QUERY> | soccer_2 | SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1) | What are the names of all tryout participants who are from the largest college? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'</SQL_QUERY> | soccer_2 | SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' | What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'</SQL_QUERY> | soccer_2 | SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' | How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.</question>
[SQL]:
| <SQL_QUERY>SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA"</SQL_QUERY> | soccer_2 | SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA" | Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students?</question>
[SQL]:
| <SQL_QUERY>SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA"</SQL_QUERY> | soccer_2 | SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA" | What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the names of schools that have some students playing in goalie and mid positions.</question>
[SQL]:
| <SQL_QUERY>SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'</SQL_QUERY> | soccer_2 | SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid' | Find the names of schools that have some students playing in goalie and mid positions. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all schools that have students trying out for the position of goal and 'mid'-field.</question>
[SQL]:
| <SQL_QUERY>SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'</SQL_QUERY> | soccer_2 | SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid' | What are the names of all schools that have students trying out for the position of goal and 'mid'-field. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the names of states that have some college students playing in goalie and mid positions.</question>
[SQL]:
| <SQL_QUERY>SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'</SQL_QUERY> | soccer_2 | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' | Find the names of states that have some college students playing in goalie and mid positions. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the states that have some college students playing in the positions of goalie and mid-field?</question>
[SQL]:
| <SQL_QUERY>SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'</SQL_QUERY> | soccer_2 | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' | What are the names of the states that have some college students playing in the positions of goalie and mid-field? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many schools have some students playing in goalie and mid positions.</question>
[SQL]:
| <SQL_QUERY>SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')</SQL_QUERY> | soccer_2 | SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid') | How many schools have some students playing in goalie and mid positions. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many schools have students playing in goalie and mid-field positions?</question>
[SQL]:
| <SQL_QUERY>SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')</SQL_QUERY> | soccer_2 | SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid') | How many schools have students playing in goalie and mid-field positions? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the names of schools that have some players in the mid position but not in the goalie position.</question>
[SQL]:
| <SQL_QUERY>SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'</SQL_QUERY> | soccer_2 | SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie' | Find the names of schools that have some players in the mid position but not in the goalie position. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the schools with some players in the mid position but no goalies?</question>
[SQL]:
| <SQL_QUERY>SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'</SQL_QUERY> | soccer_2 | SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie' | What are the names of the schools with some players in the mid position but no goalies? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the names of states that have some college students playing in the mid position but not in the goalie position.</question>
[SQL]:
| <SQL_QUERY>SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'</SQL_QUERY> | soccer_2 | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' | Find the names of states that have some college students playing in the mid position but not in the goalie position. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all the states with college students playing in the mid position but no goalies?</question>
[SQL]:
| <SQL_QUERY>SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'</SQL_QUERY> | soccer_2 | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' | What are the names of all the states with college students playing in the mid position but no goalies? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many states that have some college students playing in the mid position but not in the goalie position.</question>
[SQL]:
| <SQL_QUERY>SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')</SQL_QUERY> | soccer_2 | SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie') | How many states that have some college students playing in the mid position but not in the goalie position. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the count of states with college students playing in the mid position but not as goalies?</question>
[SQL]:
| <SQL_QUERY>SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')</SQL_QUERY> | soccer_2 | SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie') | What is the count of states with college students playing in the mid position but not as goalies? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the states where have the colleges whose enrollments are less than the largest size.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)</SQL_QUERY> | soccer_2 | SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college) | Find the states where have the colleges whose enrollments are less than the largest size. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the states with colleges that have enrollments less than the some other college?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)</SQL_QUERY> | soccer_2 | SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college) | What are the states with colleges that have enrollments less than the some other college? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')</SQL_QUERY> | soccer_2 | SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL') | Find names of colleges with enrollment greater than that of some (at least one) college in the FL state. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the colleges that are larger than at least one college in Florida?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')</SQL_QUERY> | soccer_2 | SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL') | What are the names of the colleges that are larger than at least one college in Florida? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.</question>
[SQL]:
| <SQL_QUERY>SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')</SQL_QUERY> | soccer_2 | SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL') | Find names of all colleges whose enrollment is greater than that of all colleges in the FL state. | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all colleges with a larger enrollment than the largest college in Florida?</question>
[SQL]:
| <SQL_QUERY>SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')</SQL_QUERY> | soccer_2 | SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL') | What are the names of all colleges with a larger enrollment than the largest college in Florida? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the total number of enrollment of schools that do not have any goalie player?</question>
[SQL]:
| <SQL_QUERY>SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie")</SQL_QUERY> | soccer_2 | SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie") | What is the total number of enrollment of schools that do not have any goalie player? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the total number of students enrolled in schools without any goalies?</question>
[SQL]:
| <SQL_QUERY>SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie")</SQL_QUERY> | soccer_2 | SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie") | What is the total number of students enrolled in schools without any goalies? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the number of states that has some college whose enrollment is larger than the average enrollment?</question>
[SQL]:
| <SQL_QUERY>SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)</SQL_QUERY> | soccer_2 | SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college) | What is the number of states that has some college whose enrollment is larger than the average enrollment? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many states have a college with more students than average?</question>
[SQL]:
| <SQL_QUERY>SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)</SQL_QUERY> | soccer_2 | SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college) | How many states have a college with more students than average? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?</question>
[SQL]:
| <SQL_QUERY>SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)</SQL_QUERY> | soccer_2 | SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college) | What is the number of states that has some colleges whose enrollment is smaller than the average enrollment? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number);</schema>"
<primary_keys>[Primary Keys]: college : cname, player : pid, tryout : pid</primary_keys>"
<foreign_keys>[Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many states have smaller colleges than average?</question>
[SQL]:
| <SQL_QUERY>SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)</SQL_QUERY> | soccer_2 | SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college) | How many states have smaller colleges than average? | [Schema (values) (types)]: | soccer_2 | College : cname (text) , state (text) , enr (text) | Player : pid (text) , pname (text) , ycard (text) , hs (number) | Tryout : pid (text) , cname (text) , ppos (text) , decision (number); | [Primary Keys]: college : cname, player : pid, tryout : pid | [Foreign Keys]: tryout : cname = college : cname | tryout : pid = player : pid |
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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many devices are there?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM device</SQL_QUERY> | device | SELECT count(*) FROM device | How many devices are there? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of devices.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM device</SQL_QUERY> | device | SELECT count(*) FROM device | Count the number of devices. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the carriers of devices in ascending alphabetical order.</question>
[SQL]:
| <SQL_QUERY>SELECT Carrier FROM device ORDER BY Carrier ASC</SQL_QUERY> | device | SELECT Carrier FROM device ORDER BY Carrier ASC | List the carriers of devices in ascending alphabetical order. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different carriers for devices, listed in alphabetical order?</question>
[SQL]:
| <SQL_QUERY>SELECT Carrier FROM device ORDER BY Carrier ASC</SQL_QUERY> | device | SELECT Carrier FROM device ORDER BY Carrier ASC | What are the different carriers for devices, listed in alphabetical order? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the carriers of devices whose software platforms are not "Android"?</question>
[SQL]:
| <SQL_QUERY>SELECT Carrier FROM device WHERE Software_Platform != 'Android'</SQL_QUERY> | device | SELECT Carrier FROM device WHERE Software_Platform != 'Android' | What are the carriers of devices whose software platforms are not "Android"? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the device carriers that do not have Android as their software platform.</question>
[SQL]:
| <SQL_QUERY>SELECT Carrier FROM device WHERE Software_Platform != 'Android'</SQL_QUERY> | device | SELECT Carrier FROM device WHERE Software_Platform != 'Android' | Return the device carriers that do not have Android as their software platform. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of shops in ascending order of open year?</question>
[SQL]:
| <SQL_QUERY>SELECT Shop_Name FROM shop ORDER BY Open_Year ASC</SQL_QUERY> | device | SELECT Shop_Name FROM shop ORDER BY Open_Year ASC | What are the names of shops in ascending order of open year? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the names of shops, ordered by year of opening ascending.</question>
[SQL]:
| <SQL_QUERY>SELECT Shop_Name FROM shop ORDER BY Open_Year ASC</SQL_QUERY> | device | SELECT Shop_Name FROM shop ORDER BY Open_Year ASC | Return the names of shops, ordered by year of opening ascending. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the average quantity of stocks?</question>
[SQL]:
| <SQL_QUERY>SELECT avg(Quantity) FROM stock</SQL_QUERY> | device | SELECT avg(Quantity) FROM stock | What is the average quantity of stocks? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give the average quantity of stocks.</question>
[SQL]:
| <SQL_QUERY>SELECT avg(Quantity) FROM stock</SQL_QUERY> | device | SELECT avg(Quantity) FROM stock | Give the average quantity of stocks. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names and location of the shops in ascending alphabetical order of name.</question>
[SQL]:
| <SQL_QUERY>SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC</SQL_QUERY> | device | SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC | What are the names and location of the shops in ascending alphabetical order of name. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the names and locations of shops, ordered by name in alphabetical order.</question>
[SQL]:
| <SQL_QUERY>SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC</SQL_QUERY> | device | SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC | Return the names and locations of shops, ordered by name in alphabetical order. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many different software platforms are there for devices?</question>
[SQL]:
| <SQL_QUERY>SELECT count(DISTINCT Software_Platform) FROM device</SQL_QUERY> | device | SELECT count(DISTINCT Software_Platform) FROM device | How many different software platforms are there for devices? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of different software platforms.</question>
[SQL]:
| <SQL_QUERY>SELECT count(DISTINCT Software_Platform) FROM device</SQL_QUERY> | device | SELECT count(DISTINCT Software_Platform) FROM device | Count the number of different software platforms. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the open date of open year of the shop named "Apple".</question>
[SQL]:
| <SQL_QUERY>SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple"</SQL_QUERY> | device | SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple" | List the open date of open year of the shop named "Apple". | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the open dates and years for the shop named Apple?</question>
[SQL]:
| <SQL_QUERY>SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple"</SQL_QUERY> | device | SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = "Apple" | What are the open dates and years for the shop named Apple? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of the shop with the latest open year.</question>
[SQL]:
| <SQL_QUERY>SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1</SQL_QUERY> | device | SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 | List the name of the shop with the latest open year. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the shop name corresponding to the shop that opened in the most recent year?</question>
[SQL]:
| <SQL_QUERY>SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1</SQL_QUERY> | device | SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 | What is the shop name corresponding to the shop that opened in the most recent year? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show names of shops and the carriers of devices they have in stock.</question>
[SQL]:
| <SQL_QUERY>SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID</SQL_QUERY> | device | SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID | Show names of shops and the carriers of devices they have in stock. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of device shops, and what are the carriers that they carry devices in stock for?</question>
[SQL]:
| <SQL_QUERY>SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID</SQL_QUERY> | device | SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID | What are the names of device shops, and what are the carriers that they carry devices in stock for? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show names of shops that have more than one kind of device in stock.</question>
[SQL]:
| <SQL_QUERY>SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1</SQL_QUERY> | device | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 | Show names of shops that have more than one kind of device in stock. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of shops that have more than a single kind of device in stock?</question>
[SQL]:
| <SQL_QUERY>SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1</SQL_QUERY> | device | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 | What are the names of shops that have more than a single kind of device in stock? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the name of the shop that has the most kind of devices in stock.</question>
[SQL]:
| <SQL_QUERY>SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY> | device | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1 | Show the name of the shop that has the most kind of devices in stock. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of the shop that has the most different kinds of devices in stock?</question>
[SQL]:
| <SQL_QUERY>SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY> | device | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1 | What is the name of the shop that has the most different kinds of devices in stock? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the name of the shop that have the largest quantity of devices in stock.</question>
[SQL]:
| <SQL_QUERY>SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1</SQL_QUERY> | device | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 | Show the name of the shop that have the largest quantity of devices in stock. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of the shop that has the greatest quantity of devices in stock?</question>
[SQL]:
| <SQL_QUERY>SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1</SQL_QUERY> | device | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 | What is the name of the shop that has the greatest quantity of devices in stock? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Please show different software platforms and the corresponding number of devices using each.</question>
[SQL]:
| <SQL_QUERY>SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform</SQL_QUERY> | device | SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform | Please show different software platforms and the corresponding number of devices using each. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different software platforms for devices, and how many devices have each?</question>
[SQL]:
| <SQL_QUERY>SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform</SQL_QUERY> | device | SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform | What are the different software platforms for devices, and how many devices have each? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Please show the software platforms of devices in descending order of the count.</question>
[SQL]:
| <SQL_QUERY>SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC</SQL_QUERY> | device | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC | Please show the software platforms of devices in descending order of the count. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different software platforms for devices, ordered by frequency descending?</question>
[SQL]:
| <SQL_QUERY>SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC</SQL_QUERY> | device | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC | What are the different software platforms for devices, ordered by frequency descending? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the software platform shared by the greatest number of devices.</question>
[SQL]:
| <SQL_QUERY>SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY> | device | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 | List the software platform shared by the greatest number of devices. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the software platform that is most common amongst all devices?</question>
[SQL]:
| <SQL_QUERY>SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY> | device | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 | What is the software platform that is most common amongst all devices? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the names of shops that have no devices in stock.</question>
[SQL]:
| <SQL_QUERY>SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)</SQL_QUERY> | device | SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock) | List the names of shops that have no devices in stock. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of shops that do not have any devices in stock?</question>
[SQL]:
| <SQL_QUERY>SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)</SQL_QUERY> | device | SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock) | What are the names of shops that do not have any devices in stock? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.</question>
[SQL]:
| <SQL_QUERY>SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008</SQL_QUERY> | device | SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008 | Show the locations shared by shops with open year later than 2012 and shops with open year before 2008. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?</question>
[SQL]:
| <SQL_QUERY>SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008</SQL_QUERY> | device | SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008 | Which locations contains both shops that opened after the year 2012 and shops that opened before 2008? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the carriers of devices that have no devices in stock.</question>
[SQL]:
| <SQL_QUERY>SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)</SQL_QUERY> | device | SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock) | List the carriers of devices that have no devices in stock. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the carriers of devices that are not in stock anywhere?</question>
[SQL]:
| <SQL_QUERY>SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)</SQL_QUERY> | device | SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock) | What are the carriers of devices that are not in stock anywhere? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the carriers of devices in stock at more than one shop.</question>
[SQL]:
| <SQL_QUERY>SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1</SQL_QUERY> | device | SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1 | Show the carriers of devices in stock at more than one shop. | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text);</schema>"
<primary_keys>[Primary Keys]: device : device_id, shop : shop_id, stock : shop_id</primary_keys>"
<foreign_keys>[Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the carriers of devices that are in stock in more than a single shop?</question>
[SQL]:
| <SQL_QUERY>SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1</SQL_QUERY> | device | SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1 | What are the carriers of devices that are in stock in more than a single shop? | [Schema (values) (types)]: | device | device : device_id (text) , device (number) , carrier (text) , package_version (text) , applications (text) , software_platform (text) | shop : shop_id (text) , shop_name (number) , location (text) , open_date (text) , open_year (text) | stock : shop_id (text) , device_id (number) , quantity (text); | [Primary Keys]: device : device_id, shop : shop_id, stock : shop_id | [Foreign Keys]: stock : device_id = device : device_id | stock : shop_id = shop : shop_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)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text);</schema>"
<primary_keys>[Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id</primary_keys>"
<foreign_keys>[Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many bookings do we have?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM BOOKINGS</SQL_QUERY> | cre_Drama_Workshop_Groups | SELECT count(*) FROM BOOKINGS | How many bookings do we have? | [Schema (values) (types)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text); | [Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id | [Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_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)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text);</schema>"
<primary_keys>[Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id</primary_keys>"
<foreign_keys>[Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the total number of bookings made.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM BOOKINGS</SQL_QUERY> | cre_Drama_Workshop_Groups | SELECT count(*) FROM BOOKINGS | Count the total number of bookings made. | [Schema (values) (types)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text); | [Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id | [Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_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)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text);</schema>"
<primary_keys>[Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id</primary_keys>"
<foreign_keys>[Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the order dates of all the bookings.</question>
[SQL]:
| <SQL_QUERY>SELECT Order_Date FROM BOOKINGS</SQL_QUERY> | cre_Drama_Workshop_Groups | SELECT Order_Date FROM BOOKINGS | List the order dates of all the bookings. | [Schema (values) (types)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text); | [Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id | [Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_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)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text);</schema>"
<primary_keys>[Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id</primary_keys>"
<foreign_keys>[Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the order date of each booking?</question>
[SQL]:
| <SQL_QUERY>SELECT Order_Date FROM BOOKINGS</SQL_QUERY> | cre_Drama_Workshop_Groups | SELECT Order_Date FROM BOOKINGS | What is the order date of each booking? | [Schema (values) (types)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text); | [Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id | [Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_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)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text);</schema>"
<primary_keys>[Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id</primary_keys>"
<foreign_keys>[Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all the planned delivery dates and actual delivery dates of bookings.</question>
[SQL]:
| <SQL_QUERY>SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS</SQL_QUERY> | cre_Drama_Workshop_Groups | SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS | Show all the planned delivery dates and actual delivery dates of bookings. | [Schema (values) (types)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text); | [Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id | [Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_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)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text);</schema>"
<primary_keys>[Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id</primary_keys>"
<foreign_keys>[Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the planned delivery date and actual delivery date for each booking?</question>
[SQL]:
| <SQL_QUERY>SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS</SQL_QUERY> | cre_Drama_Workshop_Groups | SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS | What are the planned delivery date and actual delivery date for each booking? | [Schema (values) (types)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text); | [Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id | [Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_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)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text);</schema>"
<primary_keys>[Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id</primary_keys>"
<foreign_keys>[Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many customers do we have?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM CUSTOMERS</SQL_QUERY> | cre_Drama_Workshop_Groups | SELECT count(*) FROM CUSTOMERS | How many customers do we have? | [Schema (values) (types)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text); | [Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id | [Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_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)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text);</schema>"
<primary_keys>[Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id</primary_keys>"
<foreign_keys>[Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of customers recorded.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM CUSTOMERS</SQL_QUERY> | cre_Drama_Workshop_Groups | SELECT count(*) FROM CUSTOMERS | Count the number of customers recorded. | [Schema (values) (types)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text); | [Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id | [Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_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)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text);</schema>"
<primary_keys>[Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id</primary_keys>"
<foreign_keys>[Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the phone and email for customer Harold?</question>
[SQL]:
| <SQL_QUERY>SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold"</SQL_QUERY> | cre_Drama_Workshop_Groups | SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold" | What are the phone and email for customer Harold? | [Schema (values) (types)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text); | [Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id | [Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_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)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text);</schema>"
<primary_keys>[Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id</primary_keys>"
<foreign_keys>[Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the phone number and email address of customer "Harold".</question>
[SQL]:
| <SQL_QUERY>SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold"</SQL_QUERY> | cre_Drama_Workshop_Groups | SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold" | Find the phone number and email address of customer "Harold". | [Schema (values) (types)]: | cre_Drama_Workshop_Groups | Ref_Payment_Methods : payment_method_code (text) , payment_method_description (text) | Ref_Service_Types : service_type_code (text) , parent_service_type_code (text) , service_type_description (text) | Addresses : address_id (text) , line_1 (text) , line_2 (text) , city_town (text) , state_county (text) , other_details (text) | Products : product_id (text) , product_name (text) , product_price (text) , product_description (text) , other_product_service_details (text) | Marketing_Regions : marketing_region_code (text) , marketing_region_name (text) , marketing_region_descriptrion (text) , other_details (text) | Clients : client_id (text) , address_id (text) , customer_email_address (text) , customer_name (text) , customer_phone (text) , other_details (text) | Drama_Workshop_Groups : workshop_group_id (text) , address_id (text) , currency_code (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Performers : performer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Customers : customer_id (text) , address_id (text) , customer_name (text) , customer_phone (text) , customer_email_address (text) , other_details (text) | Stores : store_id (text) , address_id (text) , marketing_region_code (text) , store_name (text) , store_phone (text) , store_email_address (text) , other_details (text) | Bookings : booking_id (text) , customer_id (text) , workshop_group_id (text) , status_code (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Performers_in_Bookings : order_id (text) , performer_id (text) | Customer_Orders : order_id (text) , customer_id (text) , store_id (text) , order_date (text) , planned_delivery_date (text) , actual_delivery_date (text) , other_order_details (text) | Order_Items : order_item_id (text) , order_id (text) , product_id (text) , order_quantity (text) , other_item_details (text) | Invoices : invoice_id (text) , order_id (text) , payment_method_code (text) , product_id (text) , order_quantity (text) , other_item_details (text) , order_item_id (text) | Services : service_id (text) , service_type_code (text) , workshop_group_id (text) , product_description (text) , product_name (text) , product_price (text) , other_product_service_details (text) | Bookings_Services : order_id (text) , product_id (text) | Invoice_Items : invoice_item_id (text) , invoice_id (text) , order_id (text) , order_item_id (text) , product_id (text) , order_quantity (text) , other_item_details (text); | [Primary Keys]: ref_payment_methods : payment_method_code, ref_service_types : service_type_code, addresses : address_id, products : product_id, marketing_regions : marketing_region_code, clients : client_id, drama_workshop_groups : workshop_group_id, performers : performer_id, customers : customer_id, stores : store_id, bookings : booking_id, performers_in_bookings : order_id, customer_orders : order_id, order_items : order_item_id, invoices : invoice_id, services : service_id, bookings_services : order_id, invoice_items : invoice_item_id | [Foreign Keys]: clients : address_id = addresses : address_id | drama_workshop_groups : address_id = addresses : address_id | performers : address_id = addresses : address_id | customers : address_id = addresses : address_id | stores : marketing_region_code = marketing_regions : marketing_region_code | stores : address_id = addresses : address_id | bookings : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings : customer_id = clients : client_id | performers_in_bookings : order_id = bookings : booking_id | performers_in_bookings : performer_id = performers : performer_id | customer_orders : store_id = stores : store_id | customer_orders : customer_id = customers : customer_id | order_items : product_id = products : product_id | order_items : order_id = customer_orders : order_id | invoices : payment_method_code = ref_payment_methods : payment_method_code | invoices : order_id = bookings : booking_id | invoices : order_id = customer_orders : order_id | services : service_type_code = ref_service_types : service_type_code | services : workshop_group_id = drama_workshop_groups : workshop_group_id | bookings_services : product_id = services : service_id | bookings_services : order_id = bookings : booking_id | invoice_items : order_id = bookings_services : order_id | invoice_items : product_id = bookings_services : product_id | invoice_items : invoice_id = invoices : invoice_id | invoice_items : order_item_id = order_items : order_item_id |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.