question stringlengths 12 244 | answer stringlengths 18 557 | context stringlengths 27 489 | text stringlengths 108 1.05k |
|---|---|---|---|
Show the names of players and names of their coaches. | SELECT T3.Player_name, T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID | CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE coach (coach_name VARCHAR, Coach_ID VARCHAR); CREATE TABLE player_coach (Coach_ID VARCHAR, Player_ID VARCHAR) | <s>[INST] Show the names of players and names of their coaches.
context: CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE coach (coach_name VARCHAR, Coach_ID VARCHAR); CREATE TABLE player_coach (Coach_ID VARCHAR, Player_ID VARCHAR) [/INST] SELECT T3.Player_name, T2.coach_name FROM player_coac... |
Show the names of players coached by the rank 1 coach. | SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1 | CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE coach (Coach_ID VARCHAR, Rank VARCHAR); CREATE TABLE player_coach (Coach_ID VARCHAR, Player_ID VARCHAR) | <s>[INST] Show the names of players coached by the rank 1 coach.
context: CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE coach (Coach_ID VARCHAR, Rank VARCHAR); CREATE TABLE player_coach (Coach_ID VARCHAR, Player_ID VARCHAR) [/INST] SELECT T3.Player_name FROM player_coach AS T1 JOIN coach A... |
Show the names and genders of players with a coach starting after 2011. | SELECT T3.Player_name, T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T1.Starting_year > 2011 | CREATE TABLE player (Player_name VARCHAR, gender VARCHAR, Player_ID VARCHAR); CREATE TABLE player_coach (Coach_ID VARCHAR, Player_ID VARCHAR, Starting_year INTEGER); CREATE TABLE coach (Coach_ID VARCHAR) | <s>[INST] Show the names and genders of players with a coach starting after 2011.
context: CREATE TABLE player (Player_name VARCHAR, gender VARCHAR, Player_ID VARCHAR); CREATE TABLE player_coach (Coach_ID VARCHAR, Player_ID VARCHAR, Starting_year INTEGER); CREATE TABLE coach (Coach_ID VARCHAR) [/INST] SELECT T3.Player... |
Show the names of players and names of their coaches in descending order of the votes of players. | SELECT T3.Player_name, T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID ORDER BY T3.Votes DESC | CREATE TABLE coach (coach_name VARCHAR, Coach_ID VARCHAR); CREATE TABLE player_coach (Coach_ID VARCHAR, Player_ID VARCHAR); CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR, Votes VARCHAR) | <s>[INST] Show the names of players and names of their coaches in descending order of the votes of players.
context: CREATE TABLE coach (coach_name VARCHAR, Coach_ID VARCHAR); CREATE TABLE player_coach (Coach_ID VARCHAR, Player_ID VARCHAR); CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR, Votes VARCHAR) [/... |
List the names of players that do not have coaches. | SELECT Player_name FROM player WHERE NOT Player_ID IN (SELECT Player_ID FROM player_coach) | CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE player_coach (Player_name VARCHAR, Player_ID VARCHAR) | <s>[INST] List the names of players that do not have coaches.
context: CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE player_coach (Player_name VARCHAR, Player_ID VARCHAR) [/INST] SELECT Player_name FROM player WHERE NOT Player_ID IN (SELECT Player_ID FROM player_coach) </s> |
Show the residences that have both a player of gender "M" and a player of gender "F". | SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F" | CREATE TABLE player (Residence VARCHAR, gender VARCHAR) | <s>[INST] Show the residences that have both a player of gender "M" and a player of gender "F".
context: CREATE TABLE player (Residence VARCHAR, gender VARCHAR) [/INST] SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F" </s> |
How many coaches does each club has? List the club id, name and the number of coaches. | SELECT T1.club_id, T1.club_name, COUNT(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id | CREATE TABLE club (club_id VARCHAR, club_name VARCHAR); CREATE TABLE coach (club_id VARCHAR) | <s>[INST] How many coaches does each club has? List the club id, name and the number of coaches.
context: CREATE TABLE club (club_id VARCHAR, club_name VARCHAR); CREATE TABLE coach (club_id VARCHAR) [/INST] SELECT T1.club_id, T1.club_name, COUNT(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T... |
How many gold medals has the club with the most coaches won? | SELECT T1.club_id, T1.gold FROM match_result AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE match_result (club_id VARCHAR, gold VARCHAR); CREATE TABLE coach (club_id VARCHAR) | <s>[INST] How many gold medals has the club with the most coaches won?
context: CREATE TABLE match_result (club_id VARCHAR, gold VARCHAR); CREATE TABLE coach (club_id VARCHAR) [/INST] SELECT T1.club_id, T1.gold FROM match_result AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id ORDER BY COUNT(*) DE... |
How many gymnasts are there? | SELECT COUNT(*) FROM gymnast | CREATE TABLE gymnast (Id VARCHAR) | <s>[INST] How many gymnasts are there?
context: CREATE TABLE gymnast (Id VARCHAR) [/INST] SELECT COUNT(*) FROM gymnast </s> |
List the total points of gymnasts in descending order. | SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC | CREATE TABLE gymnast (Total_Points VARCHAR) | <s>[INST] List the total points of gymnasts in descending order.
context: CREATE TABLE gymnast (Total_Points VARCHAR) [/INST] SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC </s> |
List the total points of gymnasts in descending order of floor exercise points. | SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC | CREATE TABLE gymnast (Total_Points VARCHAR, Floor_Exercise_Points VARCHAR) | <s>[INST] List the total points of gymnasts in descending order of floor exercise points.
context: CREATE TABLE gymnast (Total_Points VARCHAR, Floor_Exercise_Points VARCHAR) [/INST] SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC </s> |
What is the average horizontal bar points for all gymnasts? | SELECT AVG(Horizontal_Bar_Points) FROM gymnast | CREATE TABLE gymnast (Horizontal_Bar_Points INTEGER) | <s>[INST] What is the average horizontal bar points for all gymnasts?
context: CREATE TABLE gymnast (Horizontal_Bar_Points INTEGER) [/INST] SELECT AVG(Horizontal_Bar_Points) FROM gymnast </s> |
What are the names of people in ascending alphabetical order? | SELECT Name FROM People ORDER BY Name | CREATE TABLE People (Name VARCHAR) | <s>[INST] What are the names of people in ascending alphabetical order?
context: CREATE TABLE People (Name VARCHAR) [/INST] SELECT Name FROM People ORDER BY Name </s> |
What are the names of gymnasts? | SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID | CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) | <s>[INST] What are the names of gymnasts?
context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID </s> |
What are the names of gymnasts whose hometown is not "Santo Domingo"? | SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> "Santo Domingo" | CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Hometown VARCHAR) | <s>[INST] What are the names of gymnasts whose hometown is not "Santo Domingo"?
context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Hometown VARCHAR) [/INST] SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> "S... |
What is the age of the tallest person? | SELECT Age FROM people ORDER BY Height DESC LIMIT 1 | CREATE TABLE people (Age VARCHAR, Height VARCHAR) | <s>[INST] What is the age of the tallest person?
context: CREATE TABLE people (Age VARCHAR, Height VARCHAR) [/INST] SELECT Age FROM people ORDER BY Height DESC LIMIT 1 </s> |
List the names of the top 5 oldest people. | SELECT Name FROM People ORDER BY Age DESC LIMIT 5 | CREATE TABLE People (Name VARCHAR, Age VARCHAR) | <s>[INST] List the names of the top 5 oldest people.
context: CREATE TABLE People (Name VARCHAR, Age VARCHAR) [/INST] SELECT Name FROM People ORDER BY Age DESC LIMIT 5 </s> |
What is the total point count of the youngest gymnast? | SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age LIMIT 1 | CREATE TABLE people (People_ID VARCHAR, Age VARCHAR); CREATE TABLE gymnast (Total_Points VARCHAR, Gymnast_ID VARCHAR) | <s>[INST] What is the total point count of the youngest gymnast?
context: CREATE TABLE people (People_ID VARCHAR, Age VARCHAR); CREATE TABLE gymnast (Total_Points VARCHAR, Gymnast_ID VARCHAR) [/INST] SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age LIMIT 1 </s... |
What is the average age of all gymnasts? | SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID | CREATE TABLE people (Age INTEGER, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR) | <s>[INST] What is the average age of all gymnasts?
context: CREATE TABLE people (Age INTEGER, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR) [/INST] SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID </s> |
What are the distinct hometowns of gymnasts with total points more than 57.5? | SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5 | CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points INTEGER); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) | <s>[INST] What are the distinct hometowns of gymnasts with total points more than 57.5?
context: CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points INTEGER); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) [/INST] SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.Peop... |
What are the hometowns of gymnasts and the corresponding number of gymnasts? | SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown | CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) | <s>[INST] What are the hometowns of gymnasts and the corresponding number of gymnasts?
context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) [/INST] SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Home... |
What is the most common hometown of gymnasts? | SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) | <s>[INST] What is the most common hometown of gymnasts?
context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) [/INST] SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1 </s> |
What are the hometowns that are shared by at least two gymnasts? | SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2 | CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) | <s>[INST] What are the hometowns that are shared by at least two gymnasts?
context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) [/INST] SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >... |
List the names of gymnasts in ascending order by their heights. | SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height | CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Height VARCHAR) | <s>[INST] List the names of gymnasts in ascending order by their heights.
context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Height VARCHAR) [/INST] SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height </s> |
List the distinct hometowns that are not associated with any gymnast. | SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID | CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR) | <s>[INST] List the distinct hometowns that are not associated with any gymnast.
context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR) [/INST] SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymn... |
Show the hometowns shared by people older than 23 and younger than 20. | SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20 | CREATE TABLE people (Hometown VARCHAR, Age INTEGER) | <s>[INST] Show the hometowns shared by people older than 23 and younger than 20.
context: CREATE TABLE people (Hometown VARCHAR, Age INTEGER) [/INST] SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20 </s> |
How many distinct hometowns did these people have? | SELECT COUNT(DISTINCT Hometown) FROM people | CREATE TABLE people (Hometown VARCHAR) | <s>[INST] How many distinct hometowns did these people have?
context: CREATE TABLE people (Hometown VARCHAR) [/INST] SELECT COUNT(DISTINCT Hometown) FROM people </s> |
Show the ages of gymnasts in descending order of total points. | SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC | CREATE TABLE people (Age VARCHAR, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points VARCHAR) | <s>[INST] Show the ages of gymnasts in descending order of total points.
context: CREATE TABLE people (Age VARCHAR, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points VARCHAR) [/INST] SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DES... |
Find the total savings balance of all accounts except the account with name ‘Brown’. | SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown' | CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR) | <s>[INST] Find the total savings balance of all accounts except the account with name ‘Brown’.
context: CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR) [/INST] SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.na... |
How many accounts are there in total? | SELECT COUNT(*) FROM accounts | CREATE TABLE accounts (Id VARCHAR) | <s>[INST] How many accounts are there in total?
context: CREATE TABLE accounts (Id VARCHAR) [/INST] SELECT COUNT(*) FROM accounts </s> |
What is the total checking balance in all accounts? | SELECT SUM(balance) FROM checking | CREATE TABLE checking (balance INTEGER) | <s>[INST] What is the total checking balance in all accounts?
context: CREATE TABLE checking (balance INTEGER) [/INST] SELECT SUM(balance) FROM checking </s> |
Find the average checking balance. | SELECT AVG(balance) FROM checking | CREATE TABLE checking (balance INTEGER) | <s>[INST] Find the average checking balance.
context: CREATE TABLE checking (balance INTEGER) [/INST] SELECT AVG(balance) FROM checking </s> |
How many accounts have a savings balance above the average savings balance? | SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings) | CREATE TABLE savings (balance INTEGER) | <s>[INST] How many accounts have a savings balance above the average savings balance?
context: CREATE TABLE savings (balance INTEGER) [/INST] SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings) </s> |
Find the name and id of accounts whose checking balance is below the maximum checking balance. | SELECT T1.custid, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT MAX(balance) FROM checking) | CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TABLE checking (custid VARCHAR, balance INTEGER) | <s>[INST] Find the name and id of accounts whose checking balance is below the maximum checking balance.
context: CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TABLE checking (custid VARCHAR, balance INTEGER) [/INST] SELECT T1.custid, T1.name FROM accounts AS T1 ... |
What is the checking balance of the account whose owner’s name contains the substring ‘ee’? | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%' | CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (custid VARCHAR, name VARCHAR) | <s>[INST] What is the checking balance of the account whose owner’s name contains the substring ‘ee’?
context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (custid VARCHAR, name VARCHAR) [/INST] SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T... |
Find the checking balance and saving balance in the Brown’s account. | SELECT T2.balance, T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown' | CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR) | <s>[INST] Find the checking balance and saving balance in the Brown’s account.
context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR) [/INST] SELECT T2.balance, T3.balance FROM accounts AS T1 JOIN ch... |
Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance. | SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM savings) | CREATE TABLE checking (custid VARCHAR, balance INTEGER); CREATE TABLE savings (custid VARCHAR, balance INTEGER); CREATE TABLE savings (balance INTEGER); CREATE TABLE checking (balance INTEGER); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.
context: CREATE TABLE checking (custid VARCHAR, balance INTEGER); CREATE TABLE savings (custid VARCHAR, balance INTEGER); CREATE TABLE savings (balance INTEGER); ... |
Find the checking balance of the accounts whose savings balance is higher than the average savings balance. | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings)) | CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER) | <s>[INST] Find the checking balance of the accounts whose savings balance is higher than the average savings balance.
context: CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE savings (bal... |
List all customers’ names in the alphabetical order. | SELECT name FROM accounts ORDER BY name | CREATE TABLE accounts (name VARCHAR) | <s>[INST] List all customers’ names in the alphabetical order.
context: CREATE TABLE accounts (name VARCHAR) [/INST] SELECT name FROM accounts ORDER BY name </s> |
Find the name of account that has the lowest total checking and saving balance. | SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1 | CREATE TABLE checking (custid VARCHAR, balance VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the name of account that has the lowest total checking and saving balance.
context: CREATE TABLE checking (custid VARCHAR, balance VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) [/INST] SELECT T1.name FROM accounts AS T1 JOIN checki... |
Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance. | SELECT T1.name, T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT AVG(balance) FROM savings) | CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.
context: CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER); CREATE TABLE a... |
Find the name and checking balance of the account with the lowest savings balance. | SELECT T1.name, T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1 | CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the name and checking balance of the account with the lowest savings balance.
context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) [/INST] SELECT T1.name, T2.balance FROM accounts AS... |
Find the number of checking accounts for each account name. | SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name | CREATE TABLE checking (custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the number of checking accounts for each account name.
context: CREATE TABLE checking (custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) [/INST] SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name </s> |
Find the total saving balance for each account name. | SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name | CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the total saving balance for each account name.
context: CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) [/INST] SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name </s> |
Find the name of accounts whose checking balance is below the average checking balance. | SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking) | CREATE TABLE accounts (name VARCHAR, custid VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TABLE checking (custid VARCHAR, balance INTEGER) | <s>[INST] Find the name of accounts whose checking balance is below the average checking balance.
context: CREATE TABLE accounts (name VARCHAR, custid VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TABLE checking (custid VARCHAR, balance INTEGER) [/INST] SELECT T1.name FROM accounts AS T1 JOIN checking AS T... |
Find the saving balance of the account with the highest checking balance. | SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1 | CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE checking (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (custid VARCHAR) | <s>[INST] Find the saving balance of the account with the highest checking balance.
context: CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE checking (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (custid VARCHAR) [/INST] SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.cu... |
Find the total checking and saving balance of all accounts sorted by the total balance in ascending order. | SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance | CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR) | <s>[INST] Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.
context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR) [/INST] SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON ... |
Find the name and checking balance of the account with the lowest saving balance. | SELECT T2.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1 | CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the name and checking balance of the account with the lowest saving balance.
context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) [/INST] SELECT T2.balance, T1.name FROM accounts AS ... |
Find the name, checking balance and saving balance of all accounts in the bank. | SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid | CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the name, checking balance and saving balance of all accounts in the bank.
context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) [/INST] SELECT T2.balance, T3.balance, T1.name FROM ac... |
Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order. | SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC | CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order.
context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR... |
Find the name of accounts whose checking balance is higher than corresponding saving balance. | SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance | CREATE TABLE savings (custid VARCHAR, balance INTEGER); CREATE TABLE accounts (name VARCHAR, custid VARCHAR); CREATE TABLE checking (custid VARCHAR, balance INTEGER) | <s>[INST] Find the name of accounts whose checking balance is higher than corresponding saving balance.
context: CREATE TABLE savings (custid VARCHAR, balance INTEGER); CREATE TABLE accounts (name VARCHAR, custid VARCHAR); CREATE TABLE checking (custid VARCHAR, balance INTEGER) [/INST] SELECT T1.name FROM accounts AS ... |
Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance. | SELECT T1.name, T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance | CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.
context: CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHA... |
Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order. | SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3 | CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) | <s>[INST] Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.
context: CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) [/INST] SELECT T1.name, T2.balance FROM accounts AS T1 J... |
How many main stream browsers whose market share is at least 5 exist? | SELECT COUNT(*) FROM browser WHERE market_share >= 5 | CREATE TABLE browser (market_share VARCHAR) | <s>[INST] How many main stream browsers whose market share is at least 5 exist?
context: CREATE TABLE browser (market_share VARCHAR) [/INST] SELECT COUNT(*) FROM browser WHERE market_share >= 5 </s> |
List the name of browsers in descending order by market share. | SELECT name FROM browser ORDER BY market_share DESC | CREATE TABLE browser (name VARCHAR, market_share VARCHAR) | <s>[INST] List the name of browsers in descending order by market share.
context: CREATE TABLE browser (name VARCHAR, market_share VARCHAR) [/INST] SELECT name FROM browser ORDER BY market_share DESC </s> |
List the ids, names and market shares of all browsers. | SELECT id, name, market_share FROM browser | CREATE TABLE browser (id VARCHAR, name VARCHAR, market_share VARCHAR) | <s>[INST] List the ids, names and market shares of all browsers.
context: CREATE TABLE browser (id VARCHAR, name VARCHAR, market_share VARCHAR) [/INST] SELECT id, name, market_share FROM browser </s> |
What is the maximum, minimum and average market share of the listed browsers? | SELECT MAX(market_share), MIN(market_share), AVG(market_share) FROM browser | CREATE TABLE browser (market_share INTEGER) | <s>[INST] What is the maximum, minimum and average market share of the listed browsers?
context: CREATE TABLE browser (market_share INTEGER) [/INST] SELECT MAX(market_share), MIN(market_share), AVG(market_share) FROM browser </s> |
What is the id and market share of the browser Safari? | SELECT id, market_share FROM browser WHERE name = 'Safari' | CREATE TABLE browser (id VARCHAR, market_share VARCHAR, name VARCHAR) | <s>[INST] What is the id and market share of the browser Safari?
context: CREATE TABLE browser (id VARCHAR, market_share VARCHAR, name VARCHAR) [/INST] SELECT id, market_share FROM browser WHERE name = 'Safari' </s> |
What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection? | SELECT name, operating_system FROM web_client_accelerator WHERE CONNECTION <> 'Broadband' | CREATE TABLE web_client_accelerator (name VARCHAR, operating_system VARCHAR, CONNECTION VARCHAR) | <s>[INST] What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?
context: CREATE TABLE web_client_accelerator (name VARCHAR, operating_system VARCHAR, CONNECTION VARCHAR) [/INST] SELECT name, operating_system FROM web_client_accelerator WHERE CONNECTION <> 'Broadb... |
What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ? | SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T3.name = 'CProxy' AND T2.compatible_since_year > 1998 | CREATE TABLE accelerator_compatible_browser (browser_id VARCHAR, accelerator_id VARCHAR, compatible_since_year VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, name VARCHAR); CREATE TABLE browser (name VARCHAR, id VARCHAR) | <s>[INST] What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?
context: CREATE TABLE accelerator_compatible_browser (browser_id VARCHAR, accelerator_id VARCHAR, compatible_since_year VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, name VARCHAR); CREATE TABLE... |
What are the ids and names of the web accelerators that are compatible with two or more browsers? | SELECT T1.id, T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2 | CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, Name VARCHAR) | <s>[INST] What are the ids and names of the web accelerators that are compatible with two or more browsers?
context: CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, Name VARCHAR) [/INST] SELECT T1.id, T1.Name FROM web_client_accelerator AS T1 JOIN ... |
What is the id and name of the browser that is compatible with the most web accelerators? | SELECT T1.id, T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE browser (id VARCHAR, name VARCHAR); CREATE TABLE accelerator_compatible_browser (browser_id VARCHAR) | <s>[INST] What is the id and name of the browser that is compatible with the most web accelerators?
context: CREATE TABLE browser (id VARCHAR, name VARCHAR); CREATE TABLE accelerator_compatible_browser (browser_id VARCHAR) [/INST] SELECT T1.id, T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1... |
When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible? | SELECT T1.compatible_since_year FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer' | CREATE TABLE accelerator_compatible_browser (compatible_since_year VARCHAR, browser_id VARCHAR, accelerator_id VARCHAR); CREATE TABLE browser (id VARCHAR, name VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, name VARCHAR) | <s>[INST] When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?
context: CREATE TABLE accelerator_compatible_browser (compatible_since_year VARCHAR, browser_id VARCHAR, accelerator_id VARCHAR); CREATE TABLE browser (id VARCHAR, name VARCHAR); CREATE TABLE web_client_accelerator (id... |
How many different kinds of clients are supported by the web clients accelerators? | SELECT COUNT(DISTINCT client) FROM web_client_accelerator | CREATE TABLE web_client_accelerator (client VARCHAR) | <s>[INST] How many different kinds of clients are supported by the web clients accelerators?
context: CREATE TABLE web_client_accelerator (client VARCHAR) [/INST] SELECT COUNT(DISTINCT client) FROM web_client_accelerator </s> |
How many accelerators are not compatible with the browsers listed ? | SELECT COUNT(*) FROM web_client_accelerator WHERE NOT id IN (SELECT accelerator_id FROM accelerator_compatible_browser) | CREATE TABLE accelerator_compatible_browser (id VARCHAR, accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, accelerator_id VARCHAR) | <s>[INST] How many accelerators are not compatible with the browsers listed ?
context: CREATE TABLE accelerator_compatible_browser (id VARCHAR, accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, accelerator_id VARCHAR) [/INST] SELECT COUNT(*) FROM web_client_accelerator WHERE NOT id IN (SELECT a... |
What distinct accelerator names are compatible with the browswers that have market share higher than 15? | SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15 | CREATE TABLE web_client_accelerator (name VARCHAR, id VARCHAR); CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR, browser_id VARCHAR); CREATE TABLE browser (id VARCHAR, market_share INTEGER) | <s>[INST] What distinct accelerator names are compatible with the browswers that have market share higher than 15?
context: CREATE TABLE web_client_accelerator (name VARCHAR, id VARCHAR); CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR, browser_id VARCHAR); CREATE TABLE browser (id VARCHAR, market_... |
List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'. | SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'CACHEbox' INTERSECT SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id... | CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR, browser_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, name VARCHAR); CREATE TABLE browser (name VARCHAR, id VARCHAR) | <s>[INST] List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.
context: CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR, browser_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, name VARCHAR); CREATE TABLE browser (name VARCHAR, id VARCHAR) [/INST] SE... |
Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'. | SELECT name, operating_system FROM web_client_accelerator EXCEPT SELECT T1.name, T1.operating_system FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.name = 'Opera' | CREATE TABLE browser (id VARCHAR, name VARCHAR); CREATE TABLE web_client_accelerator (name VARCHAR, operating_system VARCHAR); CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR, browser_id VARCHAR); CREATE TABLE web_client_accelerator (name VARCHAR, operating_system VARCHAR, id VARCHAR) | <s>[INST] Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.
context: CREATE TABLE browser (id VARCHAR, name VARCHAR); CREATE TABLE web_client_accelerator (name VARCHAR, operating_system VARCHAR); CREATE TABLE accelerator_compatible_browser (accelerator_... |
Which accelerator name contains substring "Opera"? | SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%" | CREATE TABLE web_client_accelerator (name VARCHAR) | <s>[INST] Which accelerator name contains substring "Opera"?
context: CREATE TABLE web_client_accelerator (name VARCHAR) [/INST] SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%" </s> |
Find the number of web accelerators used for each Operating system. | SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system | CREATE TABLE web_client_accelerator (Operating_system VARCHAR) | <s>[INST] Find the number of web accelerators used for each Operating system.
context: CREATE TABLE web_client_accelerator (Operating_system VARCHAR) [/INST] SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system </s> |
give me names of all compatible browsers and accelerators in the descending order of compatible year | SELECT T2.name, T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id ORDER BY T1.compatible_since_year DESC | CREATE TABLE accelerator_compatible_browser (browser_id VARCHAR, accelerator_id VARCHAR, compatible_since_year VARCHAR); CREATE TABLE web_client_accelerator (name VARCHAR, id VARCHAR); CREATE TABLE browser (name VARCHAR, id VARCHAR) | <s>[INST] give me names of all compatible browsers and accelerators in the descending order of compatible year
context: CREATE TABLE accelerator_compatible_browser (browser_id VARCHAR, accelerator_id VARCHAR, compatible_since_year VARCHAR); CREATE TABLE web_client_accelerator (name VARCHAR, id VARCHAR); CREATE TABLE b... |
How many wrestlers are there? | SELECT COUNT(*) FROM wrestler | CREATE TABLE wrestler (Id VARCHAR) | <s>[INST] How many wrestlers are there?
context: CREATE TABLE wrestler (Id VARCHAR) [/INST] SELECT COUNT(*) FROM wrestler </s> |
List the names of wrestlers in descending order of days held. | SELECT Name FROM wrestler ORDER BY Days_held DESC | CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR) | <s>[INST] List the names of wrestlers in descending order of days held.
context: CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR) [/INST] SELECT Name FROM wrestler ORDER BY Days_held DESC </s> |
What is the name of the wrestler with the fewest days held? | SELECT Name FROM wrestler ORDER BY Days_held LIMIT 1 | CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR) | <s>[INST] What is the name of the wrestler with the fewest days held?
context: CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR) [/INST] SELECT Name FROM wrestler ORDER BY Days_held LIMIT 1 </s> |
What are the distinct reigns of wrestlers whose location is not "Tokyo,Japan" ? | SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> "Tokyo , Japan" | CREATE TABLE wrestler (Reign VARCHAR, LOCATION VARCHAR) | <s>[INST] What are the distinct reigns of wrestlers whose location is not "Tokyo,Japan" ?
context: CREATE TABLE wrestler (Reign VARCHAR, LOCATION VARCHAR) [/INST] SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> "Tokyo , Japan" </s> |
What are the names and location of the wrestlers? | SELECT Name, LOCATION FROM wrestler | CREATE TABLE wrestler (Name VARCHAR, LOCATION VARCHAR) | <s>[INST] What are the names and location of the wrestlers?
context: CREATE TABLE wrestler (Name VARCHAR, LOCATION VARCHAR) [/INST] SELECT Name, LOCATION FROM wrestler </s> |
What are the elimination moves of wrestlers whose team is "Team Orton"? | SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton" | CREATE TABLE Elimination (Elimination_Move VARCHAR, Team VARCHAR) | <s>[INST] What are the elimination moves of wrestlers whose team is "Team Orton"?
context: CREATE TABLE Elimination (Elimination_Move VARCHAR, Team VARCHAR) [/INST] SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton" </s> |
What are the names of wrestlers and the elimination moves? | SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID | CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE elimination (Elimination_Move VARCHAR, Wrestler_ID VARCHAR) | <s>[INST] What are the names of wrestlers and the elimination moves?
context: CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE elimination (Elimination_Move VARCHAR, Wrestler_ID VARCHAR) [/INST] SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2... |
List the names of wrestlers and the teams in elimination in descending order of days held. | SELECT T2.Name, T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC | CREATE TABLE elimination (Team VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR, Days_held VARCHAR) | <s>[INST] List the names of wrestlers and the teams in elimination in descending order of days held.
context: CREATE TABLE elimination (Team VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR, Days_held VARCHAR) [/INST] SELECT T2.Name, T1.Team FROM elimination AS T1 JOIN wrestler A... |
List the time of elimination of the wrestlers with largest days held. | SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1 | CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held VARCHAR); CREATE TABLE elimination (Time VARCHAR, Wrestler_ID VARCHAR) | <s>[INST] List the time of elimination of the wrestlers with largest days held.
context: CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held VARCHAR); CREATE TABLE elimination (Time VARCHAR, Wrestler_ID VARCHAR) [/INST] SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDE... |
Show times of elimination of wrestlers with days held more than 50. | SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50 | CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held INTEGER); CREATE TABLE elimination (Time VARCHAR, Wrestler_ID VARCHAR) | <s>[INST] Show times of elimination of wrestlers with days held more than 50.
context: CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held INTEGER); CREATE TABLE elimination (Time VARCHAR, Wrestler_ID VARCHAR) [/INST] SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE ... |
Show different teams in eliminations and the number of eliminations from each team. | SELECT Team, COUNT(*) FROM elimination GROUP BY Team | CREATE TABLE elimination (Team VARCHAR) | <s>[INST] Show different teams in eliminations and the number of eliminations from each team.
context: CREATE TABLE elimination (Team VARCHAR) [/INST] SELECT Team, COUNT(*) FROM elimination GROUP BY Team </s> |
Show teams that have suffered more than three eliminations. | SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3 | CREATE TABLE elimination (Team VARCHAR) | <s>[INST] Show teams that have suffered more than three eliminations.
context: CREATE TABLE elimination (Team VARCHAR) [/INST] SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3 </s> |
Show the reign and days held of wrestlers. | SELECT Reign, Days_held FROM wrestler | CREATE TABLE wrestler (Reign VARCHAR, Days_held VARCHAR) | <s>[INST] Show the reign and days held of wrestlers.
context: CREATE TABLE wrestler (Reign VARCHAR, Days_held VARCHAR) [/INST] SELECT Reign, Days_held FROM wrestler </s> |
What are the names of wrestlers days held less than 100? | SELECT Name FROM wrestler WHERE Days_held < 100 | CREATE TABLE wrestler (Name VARCHAR, Days_held INTEGER) | <s>[INST] What are the names of wrestlers days held less than 100?
context: CREATE TABLE wrestler (Name VARCHAR, Days_held INTEGER) [/INST] SELECT Name FROM wrestler WHERE Days_held < 100 </s> |
Please show the most common reigns of wrestlers. | SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE wrestler (Reign VARCHAR) | <s>[INST] Please show the most common reigns of wrestlers.
context: CREATE TABLE wrestler (Reign VARCHAR) [/INST] SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1 </s> |
List the locations that are shared by more than two wrestlers. | SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2 | CREATE TABLE wrestler (LOCATION VARCHAR) | <s>[INST] List the locations that are shared by more than two wrestlers.
context: CREATE TABLE wrestler (LOCATION VARCHAR) [/INST] SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2 </s> |
List the names of wrestlers that have not been eliminated. | SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination) | CREATE TABLE elimination (Name VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR) | <s>[INST] List the names of wrestlers that have not been eliminated.
context: CREATE TABLE elimination (Name VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR) [/INST] SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination) </s> |
Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin". | SELECT Team FROM Elimination WHERE Eliminated_By = "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = "Benjamin" | CREATE TABLE Elimination (Team VARCHAR, Eliminated_By VARCHAR) | <s>[INST] Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin".
context: CREATE TABLE Elimination (Team VARCHAR, Eliminated_By VARCHAR) [/INST] SELECT Team FROM Elimination WHERE Eliminated_By = "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = "Benjam... |
What is the number of distinct teams that suffer elimination? | SELECT COUNT(DISTINCT team) FROM elimination | CREATE TABLE elimination (team VARCHAR) | <s>[INST] What is the number of distinct teams that suffer elimination?
context: CREATE TABLE elimination (team VARCHAR) [/INST] SELECT COUNT(DISTINCT team) FROM elimination </s> |
Show the times of elimination by "Punk" or "Orton". | SELECT TIME FROM elimination WHERE Eliminated_By = "Punk" OR Eliminated_By = "Orton" | CREATE TABLE elimination (TIME VARCHAR, Eliminated_By VARCHAR) | <s>[INST] Show the times of elimination by "Punk" or "Orton".
context: CREATE TABLE elimination (TIME VARCHAR, Eliminated_By VARCHAR) [/INST] SELECT TIME FROM elimination WHERE Eliminated_By = "Punk" OR Eliminated_By = "Orton" </s> |
How many schools are there? | SELECT COUNT(*) FROM school | CREATE TABLE school (Id VARCHAR) | <s>[INST] How many schools are there?
context: CREATE TABLE school (Id VARCHAR) [/INST] SELECT COUNT(*) FROM school </s> |
Show all school names in alphabetical order. | SELECT school_name FROM school ORDER BY school_name | CREATE TABLE school (school_name VARCHAR) | <s>[INST] Show all school names in alphabetical order.
context: CREATE TABLE school (school_name VARCHAR) [/INST] SELECT school_name FROM school ORDER BY school_name </s> |
List the name, location, mascot for all schools. | SELECT school_name, LOCATION, mascot FROM school | CREATE TABLE school (school_name VARCHAR, LOCATION VARCHAR, mascot VARCHAR) | <s>[INST] List the name, location, mascot for all schools.
context: CREATE TABLE school (school_name VARCHAR, LOCATION VARCHAR, mascot VARCHAR) [/INST] SELECT school_name, LOCATION, mascot FROM school </s> |
What are the total and average enrollment of all schools? | SELECT SUM(enrollment), AVG(enrollment) FROM school | CREATE TABLE school (enrollment INTEGER) | <s>[INST] What are the total and average enrollment of all schools?
context: CREATE TABLE school (enrollment INTEGER) [/INST] SELECT SUM(enrollment), AVG(enrollment) FROM school </s> |
What are the mascots for schools with enrollments above the average? | SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school) | CREATE TABLE school (mascot VARCHAR, enrollment INTEGER) | <s>[INST] What are the mascots for schools with enrollments above the average?
context: CREATE TABLE school (mascot VARCHAR, enrollment INTEGER) [/INST] SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school) </s> |
List the name of the school with the smallest enrollment. | SELECT school_name FROM school ORDER BY enrollment LIMIT 1 | CREATE TABLE school (school_name VARCHAR, enrollment VARCHAR) | <s>[INST] List the name of the school with the smallest enrollment.
context: CREATE TABLE school (school_name VARCHAR, enrollment VARCHAR) [/INST] SELECT school_name FROM school ORDER BY enrollment LIMIT 1 </s> |
Show the average, maximum, minimum enrollment of all schools. | SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school | CREATE TABLE school (enrollment INTEGER) | <s>[INST] Show the average, maximum, minimum enrollment of all schools.
context: CREATE TABLE school (enrollment INTEGER) [/INST] SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school </s> |
Show each county along with the number of schools and total enrollment in each county. | SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county | CREATE TABLE school (county VARCHAR, enrollment INTEGER) | <s>[INST] Show each county along with the number of schools and total enrollment in each county.
context: CREATE TABLE school (county VARCHAR, enrollment INTEGER) [/INST] SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county </s> |
How many donors have endowment for school named "Glenn"? | SELECT COUNT(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = "Glenn" | CREATE TABLE school (school_id VARCHAR, school_name VARCHAR); CREATE TABLE endowment (donator_name VARCHAR, school_id VARCHAR) | <s>[INST] How many donors have endowment for school named "Glenn"?
context: CREATE TABLE school (school_id VARCHAR, school_name VARCHAR); CREATE TABLE endowment (donator_name VARCHAR, school_id VARCHAR) [/INST] SELECT COUNT(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.