Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the different states that had students successfully try out? [/INST]

Output: SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.decision  =  'yes';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the name and college of students whose decisions are yes in the tryout. [/INST]

Output: SELECT T1.pName ,  T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges? [/INST]

Output: SELECT T1.pName ,  T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the name of all students who were in the tryout sorted in alphabetic order. [/INST]

Output: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID ORDER BY T1.pName;


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of all students who tried out in alphabetical order? [/INST]

Output: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID ORDER BY T1.pName;


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the name and hours of the students whose tryout decision is yes. [/INST]

Output: SELECT T1.pName ,  T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names and hours spent practicing of every student who received a yes at tryouts? [/INST]

Output: SELECT T1.pName ,  T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the states of the colleges that have students in the tryout who played in striker position. [/INST]

Output: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'striker';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the states of the colleges where students who tried out for the striker position attend? [/INST]

Output: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'striker';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the names of the students who are in the position of striker and got a yes tryout decision. [/INST]

Output: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes' AND T2.pPos  =  'striker';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of all students who successfully tried out for the position of striker? [/INST]

Output: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes' AND T2.pPos  =  'striker';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the state of the college which player Charles is attending. [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: In which state is the college that Charles attends? [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the average and maximum hours for the students whose tryout decision is yes. [/INST]

Output: SELECT avg(T1.HS) ,  max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What is the average and maximum number of hours students who made the team practiced? [/INST]

Output: SELECT avg(T1.HS) ,  max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the average hours for the students whose tryout decision is no. [/INST]

Output: SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'no';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What is the average number of hours spent practicing for students who got rejected? [/INST]

Output: SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'no';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What is the maximum training hours for the students whose training hours is greater than 1000 in different positions? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: For each position, what is the maximum number of  hours for students who spent more than 1000 hours training? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Which colleges do the tryout players whose name starts with letter D go to? [/INST]

Output: SELECT T1.cName FROM  tryout AS T1 JOIN player AS T2 ON T1.pID  =  T2.pID WHERE T2.pName LIKE 'D%';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Which colleges does each player with a name that starts with the letter D  who tried out go to? [/INST]

Output: SELECT T1.cName FROM  tryout AS T1 JOIN player AS T2 ON T1.pID  =  T2.pID WHERE T2.pName LIKE 'D%';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Which college has any student who is a goalie and succeeded in the tryout. [/INST]

Output: SELECT cName FROM  tryout WHERE decision  =  'yes' AND pPos  =  'goalie';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What college has a student who successfully made the team in the role of a goalie? [/INST]

Output: SELECT cName FROM  tryout WHERE decision  =  'yes' AND pPos  =  'goalie';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the name of the tryout players who are from the college with largest size. [/INST]

Output: 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);


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of all tryout participants who are from the largest college? [/INST]

Output: 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);


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision. [/INST]

Output: SELECT DISTINCT T1.state ,  T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.decision  =  'yes';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges? [/INST]

Output: SELECT DISTINCT T1.state ,  T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.decision  =  'yes';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment. [/INST]

Output: SELECT cName FROM College WHERE enr  <  13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr  >  15000 AND state = "LA";


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following 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? [/INST]

Output: SELECT cName FROM College WHERE enr  <  13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr  >  15000 AND state = "LA";


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the names of schools that have some students playing in goalie and mid positions. [/INST]

Output: SELECT cName FROM  tryout WHERE pPos  =  'goalie' INTERSECT SELECT cName FROM  tryout WHERE pPos  =  'mid';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of all schools that have students trying out for the position of goal and 'mid'-field. [/INST]

Output: SELECT cName FROM  tryout WHERE pPos  =  'goalie' INTERSECT SELECT cName FROM  tryout WHERE pPos  =  'mid';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the names of states that have some college students playing in goalie and mid positions. [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of the states that have some college students playing in the positions of goalie and mid-field? [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: How many schools have some students playing in goalie and mid positions. [/INST]

Output: SELECT COUNT(*) FROM (SELECT cName FROM  tryout WHERE pPos  =  'goalie' INTERSECT SELECT cName FROM  tryout WHERE pPos  =  'mid');


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: How many schools have students playing in goalie and mid-field positions? [/INST]

Output: SELECT COUNT(*) FROM (SELECT cName FROM  tryout WHERE pPos  =  'goalie' INTERSECT SELECT cName FROM  tryout WHERE pPos  =  'mid');


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the names of schools that have some players in the mid position but not in the goalie position. [/INST]

Output: SELECT cName FROM  tryout WHERE pPos  =  'mid' EXCEPT SELECT cName FROM  tryout WHERE pPos  =  'goalie';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of the schools with some players in the mid position but no goalies? [/INST]

Output: SELECT cName FROM  tryout WHERE pPos  =  'mid' EXCEPT SELECT cName FROM  tryout WHERE pPos  =  'goalie';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the names of states that have some college students playing in the mid position but not in the goalie position. [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of all the states with college students playing in the mid position but no goalies? [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: How many states that have some college students playing in the mid position but not in the goalie position. [/INST]

Output: 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');


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What is the count of states with college students playing in the mid position but not as goalies? [/INST]

Output: 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');


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find the states where have the colleges whose enrollments are less than the largest size. [/INST]

Output: SELECT DISTINCT state FROM college WHERE enr  <  (SELECT max(enr) FROM college);


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the states with colleges that have enrollments less than the some other college? [/INST]

Output: SELECT DISTINCT state FROM college WHERE enr  <  (SELECT max(enr) FROM college);


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find names of colleges with enrollment greater than that of some (at least one) college in the FL state. [/INST]

Output: SELECT DISTINCT cName FROM college WHERE enr  >  (SELECT min(enr) FROM college WHERE state  =  'FL');


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of the colleges that are larger than at least one college in Florida? [/INST]

Output: SELECT DISTINCT cName FROM college WHERE enr  >  (SELECT min(enr) FROM college WHERE state  =  'FL');


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: Find names of all colleges whose enrollment is greater than that of all colleges in the FL state. [/INST]

Output: SELECT cName FROM college WHERE enr  >  (SELECT max(enr) FROM college WHERE state  =  'FL');


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of all colleges with a larger enrollment than the largest college in Florida? [/INST]

Output: SELECT cName FROM college WHERE enr  >  (SELECT max(enr) FROM college WHERE state  =  'FL');


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What is the total number of enrollment of schools that do not have any goalie player? [/INST]

Output: SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos  =  "goalie");


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What is the total number of students enrolled in schools without any goalies? [/INST]

Output: SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos  =  "goalie");


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What is the number of states that has some college whose enrollment is larger than the average enrollment? [/INST]

Output: SELECT count(DISTINCT state) FROM college WHERE enr  >  (SELECT avg(enr) FROM college);


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: How many states have a college with more students than average? [/INST]

Output: SELECT count(DISTINCT state) FROM college WHERE enr  >  (SELECT avg(enr) FROM college);


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: What is the number of states that has some colleges whose enrollment is smaller than the average enrollment? [/INST]

Output: SELECT count(DISTINCT state) FROM college WHERE enr  <  (SELECT avg(enr) FROM college);


Input:
[INST] Here is a database schema:
College :
cName [ TEXT ] primary_key
state [ TEXT ]
enr [ INT ]

Player :
pID [ INT ] primary_key
pName [ TEXT ]
yCard [ TEXT ]
HS [ INT ]

Tryout :
pID [ INT ] primary_key Tryout.pID = Player.pID
cName [ TEXT ] Tryout.cName = College.cName
pPos [ TEXT ]
decision [ TEXT ]

Please write me a SQL statement that answers the following question: How many states have smaller colleges than average? [/INST]

Output: SELECT count(DISTINCT state) FROM college WHERE enr  <  (SELECT avg(enr) FROM college);


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: How many devices are there? [/INST]

Output: SELECT count(*) FROM device;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Count the number of devices. [/INST]

Output: SELECT count(*) FROM device;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: List the carriers of devices in ascending alphabetical order. [/INST]

Output: SELECT Carrier FROM device ORDER BY Carrier ASC;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the different carriers for devices, listed in alphabetical order? [/INST]

Output: SELECT Carrier FROM device ORDER BY Carrier ASC;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the carriers of devices whose software platforms are not "Android"? [/INST]

Output: SELECT Carrier FROM device WHERE Software_Platform != 'Android';


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Return the device carriers that do not have Android as their software platform. [/INST]

Output: SELECT Carrier FROM device WHERE Software_Platform != 'Android';


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the names of shops in ascending order of open year? [/INST]

Output: SELECT Shop_Name FROM shop ORDER BY Open_Year ASC;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Return the names of shops, ordered by year of opening ascending. [/INST]

Output: SELECT Shop_Name FROM shop ORDER BY Open_Year ASC;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What is the average quantity of stocks? [/INST]

Output: SELECT avg(Quantity) FROM stock;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Give the average quantity of stocks. [/INST]

Output: SELECT avg(Quantity) FROM stock;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the names and location of the shops in ascending alphabetical order of name. [/INST]

Output: SELECT Shop_Name ,  LOCATION FROM shop ORDER BY Shop_Name ASC;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Return the names and locations of shops, ordered by name in alphabetical order. [/INST]

Output: SELECT Shop_Name ,  LOCATION FROM shop ORDER BY Shop_Name ASC;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: How many different software platforms are there for devices? [/INST]

Output: SELECT count(DISTINCT Software_Platform) FROM device;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Count the number of different software platforms. [/INST]

Output: SELECT count(DISTINCT Software_Platform) FROM device;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: List the open date of open year of the shop named "Apple". [/INST]

Output: SELECT Open_Date ,  Open_Year FROM shop WHERE Shop_Name  =  "Apple";


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the open dates and years for the shop named Apple? [/INST]

Output: SELECT Open_Date ,  Open_Year FROM shop WHERE Shop_Name  =  "Apple";


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: List the name of the shop with the latest open year. [/INST]

Output: SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What is the shop name corresponding to the shop that opened in the most recent year? [/INST]

Output: SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Show names of shops and the carriers of devices they have in stock. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the names of device shops, and what are the carriers that they carry devices in stock for? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Show names of shops that have more than one kind of device in stock. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the names of shops that have more than a single kind of device in stock? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Show the name of the shop that has the most kind of devices in stock. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What is the name of the shop that has the most different kinds of devices in stock? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Show the name of the shop that have the largest quantity of devices in stock. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What is the name of the shop that has the greatest quantity of devices in stock? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Please show different software platforms and the corresponding number of devices using each. [/INST]

Output: SELECT Software_Platform ,  COUNT(*) FROM device GROUP BY Software_Platform;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the different software platforms for devices, and how many devices have each? [/INST]

Output: SELECT Software_Platform ,  COUNT(*) FROM device GROUP BY Software_Platform;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Please show the software platforms of devices in descending order of the count. [/INST]

Output: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the different software platforms for devices, ordered by frequency descending? [/INST]

Output: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: List the software platform shared by the greatest number of devices. [/INST]

Output: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What is the software platform that is most common amongst all devices? [/INST]

Output: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: List the names of shops that have no devices in stock. [/INST]

Output: SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock);


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the names of shops that do not have any devices in stock? [/INST]

Output: SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock);


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Show the locations shared by shops with open year later than 2012 and shops with open year before 2008. [/INST]

Output: SELECT LOCATION FROM shop WHERE Open_Year  >  2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year  <  2008;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Which locations contains both shops that opened after the year 2012 and shops that opened before 2008? [/INST]

Output: SELECT LOCATION FROM shop WHERE Open_Year  >  2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year  <  2008;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: List the carriers of devices that have no devices in stock. [/INST]

Output: SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock);


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the carriers of devices that are not in stock anywhere? [/INST]

Output: SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock);


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: Show the carriers of devices in stock at more than one shop. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
device :
Device_ID [ INT ] primary_key
Device [ TEXT ]
Carrier [ TEXT ]
Package_Version [ TEXT ]
Applications [ TEXT ]
Software_Platform [ TEXT ]

shop :
Shop_ID [ INT ] primary_key
Shop_Name [ TEXT ]
Location [ TEXT ]
Open_Date [ TEXT ]
Open_Year [ INT ]

stock :
Shop_ID [ INT ] primary_key stock.Shop_ID = shop.Shop_ID
Device_ID [ INT ] stock.Device_ID = device.Device_ID
Quantity [ INT ]

Please write me a SQL statement that answers the following question: What are the carriers of devices that are in stock in more than a single shop? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: How many bookings do we have? [/INST]

Output: SELECT count(*) FROM BOOKINGS;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Count the total number of bookings made. [/INST]

Output: SELECT count(*) FROM BOOKINGS;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: List the order dates of all the bookings. [/INST]

Output: SELECT Order_Date FROM BOOKINGS;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What is the order date of each booking? [/INST]

Output: SELECT Order_Date FROM BOOKINGS;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show all the planned delivery dates and actual delivery dates of bookings. [/INST]

Output: SELECT Planned_Delivery_Date ,  Actual_Delivery_Date FROM BOOKINGS;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the planned delivery date and actual delivery date for each booking? [/INST]

Output: SELECT Planned_Delivery_Date ,  Actual_Delivery_Date FROM BOOKINGS;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: How many customers do we have? [/INST]

Output: SELECT count(*) FROM CUSTOMERS;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Count the number of customers recorded. [/INST]

Output: SELECT count(*) FROM CUSTOMERS;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the phone and email for customer Harold? [/INST]

Output: SELECT Customer_Phone ,  Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name  =  "Harold";