answer stringlengths 18 557 | context stringlengths 27 489 | question stringlengths 12 244 | text stringlengths 275 1.7k |
|---|---|---|---|
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) | Show the names of players and names of their coaches. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE coach (coach_name VA... |
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) | Show the names of players coached by the rank 1 coach. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE coach (Coach_ID V... |
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) | Show the names and genders of players with a coach starting after 2011. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE player (Player_name VARCHAR, gender VARCHAR, Player_ID V... |
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) | Show the names of players and names of their coaches in descending order of the votes of players. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE coach (coach_name VARCHAR, Coach_ID VARCHAR); CREATE TABLE ... |
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) | List the names of players that do not have coaches. | <s>[INST] Given the following SQL query and context: Query: SELECT Player_name FROM player WHERE NOT Player_ID IN (SELECT Player_ID FROM player_coach) Context: CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE player_coach (Player_name VARCHAR, Player_ID VARCHAR) [/INST] Based on the provided S... |
SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F" | CREATE TABLE player (Residence VARCHAR, gender VARCHAR) | Show the residences that have both a player of gender "M" and a player of gender "F". | <s>[INST] Given the following SQL query and context: Query: SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F" Context: CREATE TABLE player (Residence VARCHAR, gender VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the residence... |
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) | How many coaches does each club has? List the club id, name and the number of coaches. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE club (club_id VARCHAR, club_name VARCHAR); CREATE TABLE coach (club_id VARCHAR) [/INST] Based on the provided SQL qu... |
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) | How many gold medals has the club with the most coaches won? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE match_result (club_id VARCHAR, gold VARCHAR); CREATE TABLE coach (club_id VARCHAR) [/INST] B... |
SELECT COUNT(*) FROM gymnast | CREATE TABLE gymnast (Id VARCHAR) | How many gymnasts are there? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM gymnast Context: CREATE TABLE gymnast (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many gymnasts are there? The answer to your question is: SELECT COUNT(*) FROM gymnast. [/s> |
SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC | CREATE TABLE gymnast (Total_Points VARCHAR) | List the total points of gymnasts in descending order. | <s>[INST] Given the following SQL query and context: Query: SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC Context: CREATE TABLE gymnast (Total_Points VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the total points of gymnasts in descending order. The answer to your qu... |
SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC | CREATE TABLE gymnast (Total_Points VARCHAR, Floor_Exercise_Points VARCHAR) | List the total points of gymnasts in descending order of floor exercise points. | <s>[INST] Given the following SQL query and context: Query: SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC Context: CREATE TABLE gymnast (Total_Points VARCHAR, Floor_Exercise_Points VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the total points of gymnasts in... |
SELECT AVG(Horizontal_Bar_Points) FROM gymnast | CREATE TABLE gymnast (Horizontal_Bar_Points INTEGER) | What is the average horizontal bar points for all gymnasts? | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(Horizontal_Bar_Points) FROM gymnast Context: CREATE TABLE gymnast (Horizontal_Bar_Points INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average horizontal bar points for all gymnasts? The answer to your q... |
SELECT Name FROM People ORDER BY Name | CREATE TABLE People (Name VARCHAR) | What are the names of people in ascending alphabetical order? | <s>[INST] Given the following SQL query and context: Query: SELECT Name FROM People ORDER BY Name Context: CREATE TABLE People (Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of people in ascending alphabetical order? The answer to your question is: SELECT Name F... |
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) | What are the names of gymnasts? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID Context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is:... |
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) | What are the names of gymnasts whose hometown is not "Santo Domingo"? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> "Santo Domingo" Context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Hometown VARCHAR) [/INST] Based o... |
SELECT Age FROM people ORDER BY Height DESC LIMIT 1 | CREATE TABLE people (Age VARCHAR, Height VARCHAR) | What is the age of the tallest person? | <s>[INST] Given the following SQL query and context: Query: SELECT Age FROM people ORDER BY Height DESC LIMIT 1 Context: CREATE TABLE people (Age VARCHAR, Height VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the age of the tallest person? The answer to your question is: SELECT ... |
SELECT Name FROM People ORDER BY Age DESC LIMIT 5 | CREATE TABLE People (Name VARCHAR, Age VARCHAR) | List the names of the top 5 oldest people. | <s>[INST] Given the following SQL query and context: Query: SELECT Name FROM People ORDER BY Age DESC LIMIT 5 Context: CREATE TABLE People (Name VARCHAR, Age VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names of the top 5 oldest people. The answer to your question is: SELECT ... |
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) | What is the total point count of the youngest gymnast? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE people (People_ID VARCHAR, Age VARCHAR); CREATE TABLE gymnast (Total_Points VARCHAR, Gymnast_ID VARCHAR) [/INST] Based on ... |
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) | What is the average age of all gymnasts? | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID Context: CREATE TABLE people (Age INTEGER, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question ... |
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) | What are the distinct hometowns of gymnasts with total points more than 57.5? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points INTEGER); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) [/... |
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) | What are the hometowns of gymnasts and the corresponding number of gymnasts? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown Context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) [/INST] Based on the provided S... |
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) | What is the most common hometown of gymnasts? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) [/INST] Ba... |
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) | What are the hometowns that are shared by at least two gymnasts? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) [/INST] Based on the... |
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) | List the names of gymnasts in ascending order by their heights. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height Context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Height VARCHAR) [/INST] Based on the provided SQL q... |
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) | List the distinct hometowns that are not associated with any gymnast. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR); CREATE T... |
SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20 | CREATE TABLE people (Hometown VARCHAR, Age INTEGER) | Show the hometowns shared by people older than 23 and younger than 20. | <s>[INST] Given the following SQL query and context: Query: SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20 Context: CREATE TABLE people (Hometown VARCHAR, Age INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the hometowns shared by peo... |
SELECT COUNT(DISTINCT Hometown) FROM people | CREATE TABLE people (Hometown VARCHAR) | How many distinct hometowns did these people have? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT Hometown) FROM people Context: CREATE TABLE people (Hometown VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct hometowns did these people have? The answer to your question is: SELECT COUNT(D... |
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) | Show the ages of gymnasts in descending order of total points. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC Context: CREATE TABLE people (Age VARCHAR, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points VARCHAR) [/INST] Based on the... |
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) | Find the total savings balance of all accounts except the account with name ‘Brown’. | <s>[INST] Given the following SQL query and context: Query: SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown' Context: CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR) [/INST] Based on the provided ... |
SELECT COUNT(*) FROM accounts | CREATE TABLE accounts (Id VARCHAR) | How many accounts are there in total? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM accounts Context: CREATE TABLE accounts (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many accounts are there in total? The answer to your question is: SELECT COUNT(*) FROM accounts. [/s> |
SELECT SUM(balance) FROM checking | CREATE TABLE checking (balance INTEGER) | What is the total checking balance in all accounts? | <s>[INST] Given the following SQL query and context: Query: SELECT SUM(balance) FROM checking Context: CREATE TABLE checking (balance INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the total checking balance in all accounts? The answer to your question is: SELECT SUM(balance) FR... |
SELECT AVG(balance) FROM checking | CREATE TABLE checking (balance INTEGER) | Find the average checking balance. | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(balance) FROM checking Context: CREATE TABLE checking (balance INTEGER) [/INST] Based on the provided SQL query and context, your question is: Find the average checking balance. The answer to your question is: SELECT AVG(balance) FROM checking. [/s> |
SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings) | CREATE TABLE savings (balance INTEGER) | How many accounts have a savings balance above the average savings balance? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings) Context: CREATE TABLE savings (balance INTEGER) [/INST] Based on the provided SQL query and context, your question is: How many accounts have a savings balance above the average sa... |
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) | Find the name and id of accounts whose checking balance is below the maximum checking balance. | <s>[INST] Given the following SQL query and context: Query: 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) Context: CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TAB... |
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) | What is the checking balance of the account whose owner’s name contains the substring ‘ee’? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%' Context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (custid VARCHAR, name VARCHAR) [/INST] Based on the provided SQ... |
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) | Find the checking balance and saving balance in the Brown’s account. | <s>[INST] Given the following SQL query and context: Query: 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' Context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (custid V... |
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) | Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance. | <s>[INST] Given the following SQL query and context: Query: 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(balan... |
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) | Find the checking balance of the accounts whose savings balance is higher than the average savings balance. | <s>[INST] Given the following SQL query and context: Query: 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)) Context: CREATE TABLE acc... |
SELECT name FROM accounts ORDER BY name | CREATE TABLE accounts (name VARCHAR) | List all customers’ names in the alphabetical order. | <s>[INST] Given the following SQL query and context: Query: SELECT name FROM accounts ORDER BY name Context: CREATE TABLE accounts (name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all customers’ names in the alphabetical order. The answer to your question is: SELECT name FROM a... |
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) | Find the name of account that has the lowest total checking and saving balance. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE checking (custid VARCHAR, balance VARCHAR); CREATE TABLE savings (custid ... |
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) | Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance. | <s>[INST] Given the following SQL query and context: Query: 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) Context: CREATE TABLE checking (balance INTEGER, custid V... |
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) | Find the name and checking balance of the account with the lowest savings balance. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (custid V... |
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) | Find the number of checking accounts for each account name. | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name Context: CREATE TABLE checking (custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) [/INST] Based on the provided SQL query and context... |
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) | Find the total saving balance for each account name. | <s>[INST] Given the following SQL query and context: Query: SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name Context: CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) [/INST] Based on the provided... |
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) | Find the name of accounts whose checking balance is below the average checking balance. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking) Context: CREATE TABLE accounts (name VARCHAR, custid VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TABLE checking... |
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) | Find the saving balance of the account with the highest checking balance. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE checking (custid VARCH... |
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) | Find the total checking and saving balance of all accounts sorted by the total balance in ascending order. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance Context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR) [/INST] Bas... |
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) | Find the name and checking balance of the account with the lowest saving balance. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (custid V... |
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) | Find the name, checking balance and saving balance of all accounts in the bank. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid ... |
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) | 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. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE T... |
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) | Find the name of accounts whose checking balance is higher than corresponding saving balance. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE savings (custid VARCHAR, balance INTEGER); CREATE TABLE accounts (name VARCHAR, cust... |
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) | Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE sa... |
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) | Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) [/INST] Based on t... |
SELECT COUNT(*) FROM browser WHERE market_share >= 5 | CREATE TABLE browser (market_share VARCHAR) | How many main stream browsers whose market share is at least 5 exist? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM browser WHERE market_share >= 5 Context: CREATE TABLE browser (market_share VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many main stream browsers whose market share is at least 5 exist? The answer to... |
SELECT name FROM browser ORDER BY market_share DESC | CREATE TABLE browser (name VARCHAR, market_share VARCHAR) | List the name of browsers in descending order by market share. | <s>[INST] Given the following SQL query and context: Query: SELECT name FROM browser ORDER BY market_share DESC Context: CREATE TABLE browser (name VARCHAR, market_share VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name of browsers in descending order by market share. The ans... |
SELECT id, name, market_share FROM browser | CREATE TABLE browser (id VARCHAR, name VARCHAR, market_share VARCHAR) | List the ids, names and market shares of all browsers. | <s>[INST] Given the following SQL query and context: Query: SELECT id, name, market_share FROM browser Context: CREATE TABLE browser (id VARCHAR, name VARCHAR, market_share VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the ids, names and market shares of all browsers. The answer t... |
SELECT MAX(market_share), MIN(market_share), AVG(market_share) FROM browser | CREATE TABLE browser (market_share INTEGER) | What is the maximum, minimum and average market share of the listed browsers? | <s>[INST] Given the following SQL query and context: Query: SELECT MAX(market_share), MIN(market_share), AVG(market_share) FROM browser Context: CREATE TABLE browser (market_share INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the maximum, minimum and average market share of the... |
SELECT id, market_share FROM browser WHERE name = 'Safari' | CREATE TABLE browser (id VARCHAR, market_share VARCHAR, name VARCHAR) | What is the id and market share of the browser Safari? | <s>[INST] Given the following SQL query and context: Query: SELECT id, market_share FROM browser WHERE name = 'Safari' Context: CREATE TABLE browser (id VARCHAR, market_share VARCHAR, name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the id and market share of the browser Safa... |
SELECT name, operating_system FROM web_client_accelerator WHERE CONNECTION <> 'Broadband' | CREATE TABLE web_client_accelerator (name VARCHAR, operating_system VARCHAR, CONNECTION VARCHAR) | What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection? | <s>[INST] Given the following SQL query and context: Query: SELECT name, operating_system FROM web_client_accelerator WHERE CONNECTION <> 'Broadband' Context: CREATE TABLE web_client_accelerator (name VARCHAR, operating_system VARCHAR, CONNECTION VARCHAR) [/INST] Based on the provided SQL query and context, your questi... |
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) | What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE accelerator_c... |
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) | What are the ids and names of the web accelerators that are compatible with two or more browsers? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR); CREATE TABLE web_c... |
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) | What is the id and name of the browser that is compatible with the most web accelerators? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE browser (id VARCHAR, name VARCHAR); CREATE TABLE accelerator_compatible_browser (bro... |
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) | When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible? | <s>[INST] Given the following SQL query and context: Query: 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' Context: CREATE TA... |
SELECT COUNT(DISTINCT client) FROM web_client_accelerator | CREATE TABLE web_client_accelerator (client VARCHAR) | How many different kinds of clients are supported by the web clients accelerators? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT client) FROM web_client_accelerator Context: CREATE TABLE web_client_accelerator (client VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many different kinds of clients are supported by the web clients ... |
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) | How many accelerators are not compatible with the browsers listed ? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM web_client_accelerator WHERE NOT id IN (SELECT accelerator_id FROM accelerator_compatible_browser) Context: CREATE TABLE accelerator_compatible_browser (id VARCHAR, accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, ... |
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) | What distinct accelerator names are compatible with the browswers that have market share higher than 15? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE web_client_accelerator (name VARCHAR, ... |
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) | List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'. | <s>[INST] Given the following SQL query and context: Query: 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 accel... |
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) | Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'. | <s>[INST] Given the following SQL query and context: Query: 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.n... |
SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%" | CREATE TABLE web_client_accelerator (name VARCHAR) | Which accelerator name contains substring "Opera"? | <s>[INST] Given the following SQL query and context: Query: SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%" Context: CREATE TABLE web_client_accelerator (name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which accelerator name contains substring "Opera"? The answer t... |
SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system | CREATE TABLE web_client_accelerator (Operating_system VARCHAR) | Find the number of web accelerators used for each Operating system. | <s>[INST] Given the following SQL query and context: Query: SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system Context: CREATE TABLE web_client_accelerator (Operating_system VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the number of web accele... |
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) | give me names of all compatible browsers and accelerators in the descending order of compatible year | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE accelerator_compatible_bro... |
SELECT COUNT(*) FROM wrestler | CREATE TABLE wrestler (Id VARCHAR) | How many wrestlers are there? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM wrestler Context: CREATE TABLE wrestler (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many wrestlers are there? The answer to your question is: SELECT COUNT(*) FROM wrestler. [/s> |
SELECT Name FROM wrestler ORDER BY Days_held DESC | CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR) | List the names of wrestlers in descending order of days held. | <s>[INST] Given the following SQL query and context: Query: SELECT Name FROM wrestler ORDER BY Days_held DESC Context: CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names of wrestlers in descending order of days held. The answer t... |
SELECT Name FROM wrestler ORDER BY Days_held LIMIT 1 | CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR) | What is the name of the wrestler with the fewest days held? | <s>[INST] Given the following SQL query and context: Query: SELECT Name FROM wrestler ORDER BY Days_held LIMIT 1 Context: CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the name of the wrestler with the fewest days held? The answer ... |
SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> "Tokyo , Japan" | CREATE TABLE wrestler (Reign VARCHAR, LOCATION VARCHAR) | What are the distinct reigns of wrestlers whose location is not "Tokyo,Japan" ? | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> "Tokyo , Japan" Context: CREATE TABLE wrestler (Reign VARCHAR, LOCATION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the distinct reigns of wrestlers whose locati... |
SELECT Name, LOCATION FROM wrestler | CREATE TABLE wrestler (Name VARCHAR, LOCATION VARCHAR) | What are the names and location of the wrestlers? | <s>[INST] Given the following SQL query and context: Query: SELECT Name, LOCATION FROM wrestler Context: CREATE TABLE wrestler (Name VARCHAR, LOCATION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names and location of the wrestlers? The answer to your question is: SELECT ... |
SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton" | CREATE TABLE Elimination (Elimination_Move VARCHAR, Team VARCHAR) | What are the elimination moves of wrestlers whose team is "Team Orton"? | <s>[INST] Given the following SQL query and context: Query: SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton" Context: CREATE TABLE Elimination (Elimination_Move VARCHAR, Team VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the elimination moves of wrestlers who... |
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) | What are the names of wrestlers and the elimination moves? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID Context: CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE elimination (Elimination_Move VARCHAR, Wrestler_ID VARCHAR) [/INS... |
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) | List the names of wrestlers and the teams in elimination in descending order of days held. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE elimination (Team VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR, Da... |
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) | List the time of elimination of the wrestlers with largest days held. | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held VARCHAR); CREATE TABLE elimination (Time VARCHAR, Wrestler_ID VARCHAR... |
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) | Show times of elimination of wrestlers with days held more than 50. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50 Context: CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held INTEGER); CREATE TABLE elimination (Time VARCHAR, Wrestler_ID VARCHAR) [/INST] B... |
SELECT Team, COUNT(*) FROM elimination GROUP BY Team | CREATE TABLE elimination (Team VARCHAR) | Show different teams in eliminations and the number of eliminations from each team. | <s>[INST] Given the following SQL query and context: Query: SELECT Team, COUNT(*) FROM elimination GROUP BY Team Context: CREATE TABLE elimination (Team VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show different teams in eliminations and the number of eliminations from each team. The... |
SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3 | CREATE TABLE elimination (Team VARCHAR) | Show teams that have suffered more than three eliminations. | <s>[INST] Given the following SQL query and context: Query: SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3 Context: CREATE TABLE elimination (Team VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show teams that have suffered more than three eliminations. The answer to you... |
SELECT Reign, Days_held FROM wrestler | CREATE TABLE wrestler (Reign VARCHAR, Days_held VARCHAR) | Show the reign and days held of wrestlers. | <s>[INST] Given the following SQL query and context: Query: SELECT Reign, Days_held FROM wrestler Context: CREATE TABLE wrestler (Reign VARCHAR, Days_held VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the reign and days held of wrestlers. The answer to your question is: SELECT Rei... |
SELECT Name FROM wrestler WHERE Days_held < 100 | CREATE TABLE wrestler (Name VARCHAR, Days_held INTEGER) | What are the names of wrestlers days held less than 100? | <s>[INST] Given the following SQL query and context: Query: SELECT Name FROM wrestler WHERE Days_held < 100 Context: CREATE TABLE wrestler (Name VARCHAR, Days_held INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the names of wrestlers days held less than 100? The answer to your ... |
SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE wrestler (Reign VARCHAR) | Please show the most common reigns of wrestlers. | <s>[INST] Given the following SQL query and context: Query: SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE wrestler (Reign VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Please show the most common reigns of wrestlers. The answer to your q... |
SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2 | CREATE TABLE wrestler (LOCATION VARCHAR) | List the locations that are shared by more than two wrestlers. | <s>[INST] Given the following SQL query and context: Query: SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2 Context: CREATE TABLE wrestler (LOCATION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the locations that are shared by more than two wrestlers. The answ... |
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) | List the names of wrestlers that have not been eliminated. | <s>[INST] Given the following SQL query and context: Query: SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination) Context: CREATE TABLE elimination (Name VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR) [/INST] Based on the provided SQL query an... |
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) | Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin". | <s>[INST] Given the following SQL query and context: Query: SELECT Team FROM Elimination WHERE Eliminated_By = "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = "Benjamin" Context: CREATE TABLE Elimination (Team VARCHAR, Eliminated_By VARCHAR) [/INST] Based on the provided SQL query and context, your... |
SELECT COUNT(DISTINCT team) FROM elimination | CREATE TABLE elimination (team VARCHAR) | What is the number of distinct teams that suffer elimination? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT team) FROM elimination Context: CREATE TABLE elimination (team VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the number of distinct teams that suffer elimination? The answer to your question is: S... |
SELECT TIME FROM elimination WHERE Eliminated_By = "Punk" OR Eliminated_By = "Orton" | CREATE TABLE elimination (TIME VARCHAR, Eliminated_By VARCHAR) | Show the times of elimination by "Punk" or "Orton". | <s>[INST] Given the following SQL query and context: Query: SELECT TIME FROM elimination WHERE Eliminated_By = "Punk" OR Eliminated_By = "Orton" Context: CREATE TABLE elimination (TIME VARCHAR, Eliminated_By VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the times of elimination by... |
SELECT COUNT(*) FROM school | CREATE TABLE school (Id VARCHAR) | How many schools are there? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM school Context: CREATE TABLE school (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many schools are there? The answer to your question is: SELECT COUNT(*) FROM school. [/s> |
SELECT school_name FROM school ORDER BY school_name | CREATE TABLE school (school_name VARCHAR) | Show all school names in alphabetical order. | <s>[INST] Given the following SQL query and context: Query: SELECT school_name FROM school ORDER BY school_name Context: CREATE TABLE school (school_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all school names in alphabetical order. The answer to your question is: SELECT sc... |
SELECT school_name, LOCATION, mascot FROM school | CREATE TABLE school (school_name VARCHAR, LOCATION VARCHAR, mascot VARCHAR) | List the name, location, mascot for all schools. | <s>[INST] Given the following SQL query and context: Query: SELECT school_name, LOCATION, mascot FROM school Context: CREATE TABLE school (school_name VARCHAR, LOCATION VARCHAR, mascot VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name, location, mascot for all schools. The an... |
SELECT SUM(enrollment), AVG(enrollment) FROM school | CREATE TABLE school (enrollment INTEGER) | What are the total and average enrollment of all schools? | <s>[INST] Given the following SQL query and context: Query: SELECT SUM(enrollment), AVG(enrollment) FROM school Context: CREATE TABLE school (enrollment INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the total and average enrollment of all schools? The answer to your question i... |
SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school) | CREATE TABLE school (mascot VARCHAR, enrollment INTEGER) | What are the mascots for schools with enrollments above the average? | <s>[INST] Given the following SQL query and context: Query: SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school) Context: CREATE TABLE school (mascot VARCHAR, enrollment INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the mascots for schools with enr... |
SELECT school_name FROM school ORDER BY enrollment LIMIT 1 | CREATE TABLE school (school_name VARCHAR, enrollment VARCHAR) | List the name of the school with the smallest enrollment. | <s>[INST] Given the following SQL query and context: Query: SELECT school_name FROM school ORDER BY enrollment LIMIT 1 Context: CREATE TABLE school (school_name VARCHAR, enrollment VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name of the school with the smallest enrollment. T... |
SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school | CREATE TABLE school (enrollment INTEGER) | Show the average, maximum, minimum enrollment of all schools. | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school Context: CREATE TABLE school (enrollment INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the average, maximum, minimum enrollment of all schools. The answ... |
SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county | CREATE TABLE school (county VARCHAR, enrollment INTEGER) | Show each county along with the number of schools and total enrollment in each county. | <s>[INST] Given the following SQL query and context: Query: SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county Context: CREATE TABLE school (county VARCHAR, enrollment INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show each county along with the number of schools and ... |
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) | How many donors have endowment for school named "Glenn"? | <s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE school (school_id VARCHAR, school_name VARCHAR); CREATE TABLE endowment (donator_name VARCHAR, sch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.