db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
soccer_2 | select t1.pname from player as t1 join tryout as t2 on t1.pid = t2.pid order by t1.pname | Question: find the name of all students who were in the tryout sorted in alphabetic order. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the name of all students who were in the tryout sorted in alphabetic order. |
soccer_2 | select t1.pname from player as t1 join tryout as t2 on t1.pid = t2.pid order by t1.pname | Question: what are the names of all students who tried out in alphabetical order? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the names of all students who tried out in alphabetical order? |
soccer_2 | select t1.pname , t1.hs from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes' | Question: find the name and hours of the students whose tryout decision is yes. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the name and hours of the students whose tryout decision is yes. |
soccer_2 | select t1.pname , t1.hs from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes' | Question: what are the names and hours spent practicing of every student who received a yes at tryouts? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the names and hours spent practicing of every student who received a yes at tryouts? |
soccer_2 | select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'striker' | Question: find the states of the colleges that have students in the tryout who played in striker position. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the states of the colleges that have students in the tryout who played in striker position. |
soccer_2 | select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'striker' | Question: what are the states of the colleges where students who tried out for the striker position attend? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the states of the colleges where students who tried out for the striker position attend? |
soccer_2 | select t1.pname from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes' and t2.ppos = 'striker' | Question: find the names of the students who are in the position of striker and got a yes tryout decision. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the names of the students who are in the position of striker and got a yes tryout decision. |
soccer_2 | select t1.pname from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes' and t2.ppos = 'striker' | Question: what are the names of all students who successfully tried out for the position of striker? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the names of all students who successfully tried out for the position of striker? |
soccer_2 | select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname join player as t3 on t2.pid = t3.pid where t3.pname = 'charles' | Question: find the state of the college which player charles is attending. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the state of the college which player charles is attending. |
soccer_2 | select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname join player as t3 on t2.pid = t3.pid where t3.pname = 'charles' | Question: in which state is the college that charles attends? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | in which state is the college that charles attends? |
soccer_2 | select avg(t1.hs) , max(t1.hs) from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes' | Question: find the average and maximum hours for the students whose tryout decision is yes. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the average and maximum hours for the students whose tryout decision is yes. |
soccer_2 | select avg(t1.hs) , max(t1.hs) from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes' | Question: what is the average and maximum number of hours students who made the team practiced? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what is the average and maximum number of hours students who made the team practiced? |
soccer_2 | select avg(t1.hs) from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'no' | Question: find the average hours for the students whose tryout decision is no. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the average hours for the students whose tryout decision is no. |
soccer_2 | select avg(t1.hs) from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'no' | Question: what is the average number of hours spent practicing for students who got rejected? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what is the average number of hours spent practicing for students who got rejected? |
soccer_2 | select max(t1.hs) , ppos from player as t1 join tryout as t2 on t1.pid = t2.pid where t1.hs > 1000 group by t2.ppos | Question: what is the maximum training hours for the students whose training hours is greater than 1000 in different positions? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what is the maximum training hours for the students whose training hours is greater than 1000 in different positions? |
soccer_2 | select max(t1.hs) , ppos from player as t1 join tryout as t2 on t1.pid = t2.pid where t1.hs > 1000 group by t2.ppos | Question: for each position, what is the maximum number of hours for students who spent more than 1000 hours training? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | for each position, what is the maximum number of hours for students who spent more than 1000 hours training? |
soccer_2 | select t1.cname from tryout as t1 join player as t2 on t1.pid = t2.pid where t2.pname like 'd%' | Question: which colleges do the tryout players whose name starts with letter d go to? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | which colleges do the tryout players whose name starts with letter d go to? |
soccer_2 | select t1.cname from tryout as t1 join player as t2 on t1.pid = t2.pid where t2.pname like 'd%' | Question: which colleges does each player with a name that starts with the letter d who tried out go to? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | which colleges does each player with a name that starts with the letter d who tried out go to? |
soccer_2 | select cname from tryout where decision = 'yes' and ppos = 'goalie' | Question: which college has any student who is a goalie and succeeded in the tryout. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | which college has any student who is a goalie and succeeded in the tryout. |
soccer_2 | select cname from tryout where decision = 'yes' and ppos = 'goalie' | Question: what college has a student who successfully made the team in the role of a goalie? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what college has a student who successfully made the team in the role of a goalie? |
soccer_2 | select t2.pname from tryout as t1 join player as t2 on t1.pid = t2.pid where t1.cname = (select cname from college order by enr desc limit 1) | Question: find the name of the tryout players who are from the college with largest size. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the name of the tryout players who are from the college with largest size. |
soccer_2 | select t2.pname from tryout as t1 join player as t2 on t1.pid = t2.pid where t1.cname = (select cname from college order by enr desc limit 1) | Question: what are the names of all tryout participants who are from the largest college? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the names of all tryout participants who are from the largest college? |
soccer_2 | select distinct t1.state , t1.enr from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.decision = 'yes' | Question: what is the state and enrollment of the colleges where have any students who got accepted in the tryout decision. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what is the state and enrollment of the colleges where have any students who got accepted in the tryout decision. |
soccer_2 | select distinct t1.state , t1.enr from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.decision = 'yes' | Question: how many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | how many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges? |
soccer_2 | select cname from college where enr < 13000 and state = 'az' union select cname from college where enr > 15000 and state = 'la' | Question: find the names of either colleges in la with greater than 15000 size or in state az with less than 13000 enrollment. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the names of either colleges in la with greater than 15000 size or in state az with less than 13000 enrollment. |
soccer_2 | select cname from college where enr < 13000 and state = 'az' union select cname from college where enr > 15000 and state = 'la' | 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? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | 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? |
soccer_2 | select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid' | Question: find the names of schools that have some students playing in goalie and mid positions. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the names of schools that have some students playing in goalie and mid positions. |
soccer_2 | select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid' | Question: what are the names of all schools that have students trying out for the position of goal and 'mid'-field. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the names of all schools that have students trying out for the position of goal and 'mid'-field. |
soccer_2 | select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie' intersect select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid' | Question: find the names of states that have some college students playing in goalie and mid positions. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the names of states that have some college students playing in goalie and mid positions. |
soccer_2 | select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie' intersect select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid' | Question: what are the names of the states that have some college students playing in the positions of goalie and mid-field? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the names of the states that have some college students playing in the positions of goalie and mid-field? |
soccer_2 | select count(*) from (select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid') | Question: how many schools have some students playing in goalie and mid positions. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | how many schools have some students playing in goalie and mid positions. |
soccer_2 | select count(*) from (select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid') | Question: how many schools have students playing in goalie and mid-field positions? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | how many schools have students playing in goalie and mid-field positions? |
soccer_2 | select cname from tryout where ppos = 'mid' except select cname from tryout where ppos = 'goalie' | Question: find the names of schools that have some players in the mid position but not in the goalie position. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the names of schools that have some players in the mid position but not in the goalie position. |
soccer_2 | select cname from tryout where ppos = 'mid' except select cname from tryout where ppos = 'goalie' | Question: what are the names of the schools with some players in the mid position but no goalies? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the names of the schools with some players in the mid position but no goalies? |
soccer_2 | select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid' except select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie' | Question: find the names of states that have some college students playing in the mid position but not in the goalie position. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the names of states that have some college students playing in the mid position but not in the goalie position. |
soccer_2 | select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid' except select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie' | Question: what are the names of all the states with college students playing in the mid position but no goalies? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the names of all the states with college students playing in the mid position but no goalies? |
soccer_2 | select count(*) from (select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid' except select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie') | Question: how many states that have some college students playing in the mid position but not in the goalie position. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | how many states that have some college students playing in the mid position but not in the goalie position. |
soccer_2 | select count(*) from (select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid' except select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie') | Question: what is the count of states with college students playing in the mid position but not as goalies? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what is the count of states with college students playing in the mid position but not as goalies? |
soccer_2 | select distinct state from college where enr < (select max(enr) from college) | Question: find the states where have the colleges whose enrollments are less than the largest size. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find the states where have the colleges whose enrollments are less than the largest size. |
soccer_2 | select distinct state from college where enr < (select max(enr) from college) | Question: what are the states with colleges that have enrollments less than the some other college? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the states with colleges that have enrollments less than the some other college? |
soccer_2 | select distinct cname from college where enr > (select min(enr) from college where state = 'fl') | Question: find names of colleges with enrollment greater than that of some (at least one) college in the fl state. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find names of colleges with enrollment greater than that of some (at least one) college in the fl state. |
soccer_2 | select distinct cname from college where enr > (select min(enr) from college where state = 'fl') | Question: what are the names of the colleges that are larger than at least one college in florida? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the names of the colleges that are larger than at least one college in florida? |
soccer_2 | select cname from college where enr > (select max(enr) from college where state = 'fl') | Question: find names of all colleges whose enrollment is greater than that of all colleges in the fl state. | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | find names of all colleges whose enrollment is greater than that of all colleges in the fl state. |
soccer_2 | select cname from college where enr > (select max(enr) from college where state = 'fl') | Question: what are the names of all colleges with a larger enrollment than the largest college in florida? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what are the names of all colleges with a larger enrollment than the largest college in florida? |
soccer_2 | select sum(enr) from college where cname not in (select cname from tryout where ppos = 'goalie') | Question: what is the total number of enrollment of schools that do not have any goalie player? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what is the total number of enrollment of schools that do not have any goalie player? |
soccer_2 | select sum(enr) from college where cname not in (select cname from tryout where ppos = 'goalie') | Question: what is the total number of students enrolled in schools without any goalies? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what is the total number of students enrolled in schools without any goalies? |
soccer_2 | select count(distinct state) from college where enr > (select avg(enr) from college) | Question: what is the number of states that has some college whose enrollment is larger than the average enrollment? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what is the number of states that has some college whose enrollment is larger than the average enrollment? |
soccer_2 | select count(distinct state) from college where enr > (select avg(enr) from college) | Question: how many states have a college with more students than average? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | how many states have a college with more students than average? |
soccer_2 | select count(distinct state) from college where enr < (select avg(enr) from college) | Question: what is the number of states that has some colleges whose enrollment is smaller than the average enrollment? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | what is the number of states that has some colleges whose enrollment is smaller than the average enrollment? |
soccer_2 | select count(distinct state) from college where enr < (select avg(enr) from college) | Question: how many states have smaller colleges than average? | Tables: College -> cName, state, enr. Player -> pID, pName, yCard, HS. Tryout -> pID, cName, pPos, decision. | Joins: Tryout.cName = College.cName, Tryout.pID = Player.pID, | how many states have smaller colleges than average? |
device | select count(*) from device | Question: how many devices are there? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.Shop_ID = shop.Shop_ID, | how many devices are there? |
device | select count(*) from device | Question: count the number of devices. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.Shop_ID = shop.Shop_ID, | count the number of devices. |
device | select carrier from device order by carrier asc | Question: list the carriers of devices in ascending alphabetical order. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.... | list the carriers of devices in ascending alphabetical order. |
device | select carrier from device order by carrier asc | Question: what are the different carriers for devices, listed in alphabetical order? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Devi... | what are the different carriers for devices, listed in alphabetical order? |
device | select carrier from device where software_platform != 'android' | Question: what are the carriers of devices whose software platforms are not 'android'? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.De... | what are the carriers of devices whose software platforms are not 'android'? |
device | select carrier from device where software_platform != 'android' | Question: return the device carriers that do not have android as their software platform. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device... | return the device carriers that do not have android as their software platform. |
device | select shop_name from shop order by open_year asc | Question: what are the names of shops in ascending order of open year? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.S... | what are the names of shops in ascending order of open year? |
device | select shop_name from shop order by open_year asc | Question: return the names of shops, ordered by year of opening ascending. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, sto... | return the names of shops, ordered by year of opening ascending. |
device | select avg(quantity) from stock | Question: what is the average quantity of stocks? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.Shop_ID = shop.Shop_ID... | what is the average quantity of stocks? |
device | select avg(quantity) from stock | Question: give the average quantity of stocks. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.Shop_ID = shop.Shop_ID, | give the average quantity of stocks. |
device | select shop_name , location from shop order by shop_name asc | Question: what are the names and location of the shops in ascending alphabetical order of name. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = ... | what are the names and location of the shops in ascending alphabetical order of name. |
device | select shop_name , location from shop order by shop_name asc | Question: return the names and locations of shops, ordered by name in alphabetical order. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device... | return the names and locations of shops, ordered by name in alphabetical order. |
device | select count(distinct software_platform) from device | Question: how many different software platforms are there for devices? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.S... | how many different software platforms are there for devices? |
device | select count(distinct software_platform) from device | Question: count the number of different software platforms. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.Shop_ID = sh... | count the number of different software platforms. |
device | select open_date , open_year from shop where shop_name = 'apple' | Question: list the open date of open year of the shop named 'apple'. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.Sho... | list the open date of open year of the shop named 'apple'. |
device | select open_date , open_year from shop where shop_name = 'apple' | Question: what are the open dates and years for the shop named apple? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.Sh... | what are the open dates and years for the shop named apple? |
device | select shop_name from shop order by open_year desc limit 1 | Question: list the name of the shop with the latest open year. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.Shop_ID =... | list the name of the shop with the latest open year. |
device | select shop_name from shop order by open_year desc limit 1 | Question: what is the shop name corresponding to the shop that opened in the most recent year? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = d... | what is the shop name corresponding to the shop that opened in the most recent year? |
device | select t3.shop_name , t2.carrier from stock as t1 join device as t2 on t1.device_id = t2.device_id join shop as t3 on t1.shop_id = t3.shop_id | Question: show names of shops and the carriers of devices they have in stock. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, ... | show names of shops and the carriers of devices they have in stock. |
device | select t3.shop_name , t2.carrier from stock as t1 join device as t2 on t1.device_id = t2.device_id join shop as t3 on t1.shop_id = t3.shop_id | Question: what are the names of device shops, and what are the carriers that they carry devices in stock for? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stoc... | what are the names of device shops, and what are the carriers that they carry devices in stock for? |
device | select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id having count(*) > 1 | Question: show names of shops that have more than one kind of device in stock. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID,... | show names of shops that have more than one kind of device in stock. |
device | select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id having count(*) > 1 | Question: what are the names of shops that have more than a single kind of device in stock? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = devi... | what are the names of shops that have more than a single kind of device in stock? |
device | select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id order by count(*) desc limit 1 | Question: show the name of the shop that has the most kind of devices in stock. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID... | show the name of the shop that has the most kind of devices in stock. |
device | select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id order by count(*) desc limit 1 | Question: what is the name of the shop that has the most different kinds of devices in stock? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = de... | what is the name of the shop that has the most different kinds of devices in stock? |
device | select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id order by sum(t1.quantity) desc limit 1 | Question: show the name of the shop that have the largest quantity of devices in stock. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.D... | show the name of the shop that have the largest quantity of devices in stock. |
device | select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id order by sum(t1.quantity) desc limit 1 | Question: what is the name of the shop that has the greatest quantity of devices in stock? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = devic... | what is the name of the shop that has the greatest quantity of devices in stock? |
device | select software_platform , count(*) from device group by software_platform | Question: please show different software platforms and the corresponding number of devices using each. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Devic... | please show different software platforms and the corresponding number of devices using each. |
device | select software_platform , count(*) from device group by software_platform | Question: what are the different software platforms for devices, and how many devices have each? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID =... | what are the different software platforms for devices, and how many devices have each? |
device | select software_platform from device group by software_platform order by count(*) desc | Question: please show the software platforms of devices in descending order of the count. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device... | please show the software platforms of devices in descending order of the count. |
device | select software_platform from device group by software_platform order by count(*) desc | Question: what are the different software platforms for devices, ordered by frequency descending? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID ... | what are the different software platforms for devices, ordered by frequency descending? |
device | select software_platform from device group by software_platform order by count(*) desc limit 1 | Question: list the software platform shared by the greatest number of devices. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID,... | list the software platform shared by the greatest number of devices. |
device | select software_platform from device group by software_platform order by count(*) desc limit 1 | Question: what is the software platform that is most common amongst all devices? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_I... | what is the software platform that is most common amongst all devices? |
device | select shop_name from shop where shop_id not in (select shop_id from stock) | Question: list the names of shops that have no devices in stock. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.Shop_ID... | list the names of shops that have no devices in stock. |
device | select shop_name from shop where shop_id not in (select shop_id from stock) | Question: what are the names of shops that do not have any devices in stock? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, s... | what are the names of shops that do not have any devices in stock? |
device | select location from shop where open_year > 2012 intersect select location from shop where open_year < 2008 | Question: show the locations shared by shops with open year later than 2012 and shops with open year before 2008. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: ... | show the locations shared by shops with open year later than 2012 and shops with open year before 2008. |
device | select location from shop where open_year > 2012 intersect select location from shop where open_year < 2008 | Question: which locations contains both shops that opened after the year 2012 and shops that opened before 2008? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: s... | which locations contains both shops that opened after the year 2012 and shops that opened before 2008? |
device | select carrier from device where device_id not in (select device_id from stock) | Question: list the carriers of devices that have no devices in stock. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.Sh... | list the carriers of devices that have no devices in stock. |
device | select carrier from device where device_id not in (select device_id from stock) | Question: what are the carriers of devices that are not in stock anywhere? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, sto... | what are the carriers of devices that are not in stock anywhere? |
device | select t2.carrier from stock as t1 join device as t2 on t1.device_id = t2.device_id group by t1.device_id having count(*) > 1 | Question: show the carriers of devices in stock at more than one shop. | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.Device_ID, stock.S... | show the carriers of devices in stock at more than one shop. |
device | select t2.carrier from stock as t1 join device as t2 on t1.device_id = t2.device_id group by t1.device_id having count(*) > 1 | Question: what are the carriers of devices that are in stock in more than a single shop? | Tables: device -> Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform. shop -> Shop_ID, Shop_Name, Location, Open_Date, Open_Year. stock -> Shop_ID, Device_ID, Quantity. | Joins: stock.Device_ID = device.... | what are the carriers of devices that are in stock in more than a single shop? |
cre_Drama_Workshop_Groups | select count(*) from bookings | Question: how many bookings do we have? | Tables: Ref_Payment_Methods -> payment_method_code, payment_method_description. Ref_Service_Types -> Service_Type_Code, Parent_Service_Type_Code, Service_Type_Description. Addresses -> Address_ID, Line_1, Line_2, City_Town, State_County, Other_Details. Products -> Product_ID, P... | how many bookings do we have? |
cre_Drama_Workshop_Groups | select count(*) from bookings | Question: count the total number of bookings made. | Tables: Ref_Payment_Methods -> payment_method_code, payment_method_description. Ref_Service_Types -> Service_Type_Code, Parent_Service_Type_Code, Service_Type_Description. Addresses -> Address_ID, Line_1, Line_2, City_Town, State_County, Other_Details. Products -> Pr... | count the total number of bookings made. |
cre_Drama_Workshop_Groups | select order_date from bookings | Question: list the order dates of all the bookings. | Tables: Ref_Payment_Methods -> payment_method_code, payment_method_description. Ref_Service_Types -> Service_Type_Code, Parent_Service_Type_Code, Service_Type_Description. Addresses -> Address_ID, Line_1, Line_2, City_Town, State_County, Other_Details. Products -> P... | list the order dates of all the bookings. |
cre_Drama_Workshop_Groups | select order_date from bookings | Question: what is the order date of each booking? | Tables: Ref_Payment_Methods -> payment_method_code, payment_method_description. Ref_Service_Types -> Service_Type_Code, Parent_Service_Type_Code, Service_Type_Description. Addresses -> Address_ID, Line_1, Line_2, City_Town, State_County, Other_Details. Products -> Pro... | what is the order date of each booking? |
cre_Drama_Workshop_Groups | select planned_delivery_date , actual_delivery_date from bookings | Question: show all the planned delivery dates and actual delivery dates of bookings. | Tables: Ref_Payment_Methods -> payment_method_code, payment_method_description. Ref_Service_Types -> Service_Type_Code, Parent_Service_Type_Code, Service_Type_Description. Addresses -> Address_ID, Line_1, Line_2, City_Town, State_Cou... | show all the planned delivery dates and actual delivery dates of bookings. |
cre_Drama_Workshop_Groups | select planned_delivery_date , actual_delivery_date from bookings | Question: what are the planned delivery date and actual delivery date for each booking? | Tables: Ref_Payment_Methods -> payment_method_code, payment_method_description. Ref_Service_Types -> Service_Type_Code, Parent_Service_Type_Code, Service_Type_Description. Addresses -> Address_ID, Line_1, Line_2, City_Town, State_... | what are the planned delivery date and actual delivery date for each booking? |
cre_Drama_Workshop_Groups | select count(*) from customers | Question: how many customers do we have? | Tables: Ref_Payment_Methods -> payment_method_code, payment_method_description. Ref_Service_Types -> Service_Type_Code, Parent_Service_Type_Code, Service_Type_Description. Addresses -> Address_ID, Line_1, Line_2, City_Town, State_County, Other_Details. Products -> Product_ID, ... | how many customers do we have? |
cre_Drama_Workshop_Groups | select count(*) from customers | Question: count the number of customers recorded. | Tables: Ref_Payment_Methods -> payment_method_code, payment_method_description. Ref_Service_Types -> Service_Type_Code, Parent_Service_Type_Code, Service_Type_Description. Addresses -> Address_ID, Line_1, Line_2, City_Town, State_County, Other_Details. Products -> Pro... | count the number of customers recorded. |
cre_Drama_Workshop_Groups | select customer_phone , customer_email_address from customers where customer_name = 'harold' | Question: what are the phone and email for customer harold? | Tables: Ref_Payment_Methods -> payment_method_code, payment_method_description. Ref_Service_Types -> Service_Type_Code, Parent_Service_Type_Code, Service_Type_Description. Addresses -> Address_ID, Line_1, Line_2, City_Town, State_County, Other_Details. Produ... | what are the phone and email for customer harold? |
cre_Drama_Workshop_Groups | select customer_phone , customer_email_address from customers where customer_name = 'harold' | Question: find the phone number and email address of customer 'harold'. | Tables: Ref_Payment_Methods -> payment_method_code, payment_method_description. Ref_Service_Types -> Service_Type_Code, Parent_Service_Type_Code, Service_Type_Description. Addresses -> Address_ID, Line_1, Line_2, City_Town, State_County, Other_De... | find the phone number and email address of customer 'harold'. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.