question
stringlengths
19
224
context
stringlengths
30
355
answer
stringlengths
20
557
input
stringlengths
138
630
output
stringlengths
20
557
Show the names of players and names of their coaches.
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)
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
Translate the question into SQL query by using the schema. ### schema: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) ### question: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
Show the names of players coached by the rank 1 coach.
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)
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
Translate the question into SQL query by using the schema. ### schema: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) ### question: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
Show the names and genders of players with a coach starting after 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)
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
Translate the question into SQL query by using the schema. ### schema: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) ### question: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
Show the names of players and names of their coaches in descending order of the votes of players.
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)
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
Translate the question into SQL query by using the schema. ### schema: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) ### question: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
List the names of players that do not have coaches.
CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE player_coach (Player_name VARCHAR, Player_ID VARCHAR)
SELECT Player_name FROM player WHERE NOT Player_ID IN (SELECT Player_ID FROM player_coach)
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE player_coach (Player_name VARCHAR, Player_ID VARCHAR) ### question: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)
Show the residences that have both a player of gender "M" and a player of gender "F".
CREATE TABLE player (Residence VARCHAR, gender VARCHAR)
SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F"
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE player (Residence VARCHAR, gender VARCHAR) ### question: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"
How many coaches does each club has? List the club id, name and the number of coaches.
CREATE TABLE club (club_id VARCHAR, club_name VARCHAR); CREATE TABLE coach (club_id VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE club (club_id VARCHAR, club_name VARCHAR); CREATE TABLE coach (club_id VARCHAR) ### question: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
How many gold medals has the club with the most coaches won?
CREATE TABLE match_result (club_id VARCHAR, gold VARCHAR); CREATE TABLE coach (club_id VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE match_result (club_id VARCHAR, gold VARCHAR); CREATE TABLE coach (club_id VARCHAR) ### question: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
How many gymnasts are there?
CREATE TABLE gymnast (Id VARCHAR)
SELECT COUNT(*) FROM gymnast
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Id VARCHAR) ### question:How many gymnasts are there?
SELECT COUNT(*) FROM gymnast
List the total points of gymnasts in descending order.
CREATE TABLE gymnast (Total_Points VARCHAR)
SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Total_Points VARCHAR) ### question:List the total points of gymnasts in descending order.
SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC
List the total points of gymnasts in descending order of floor exercise points.
CREATE TABLE gymnast (Total_Points VARCHAR, Floor_Exercise_Points VARCHAR)
SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Total_Points VARCHAR, Floor_Exercise_Points VARCHAR) ### question:List the total points of gymnasts in descending order of floor exercise points.
SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC
What is the average horizontal bar points for all gymnasts?
CREATE TABLE gymnast (Horizontal_Bar_Points INTEGER)
SELECT AVG(Horizontal_Bar_Points) FROM gymnast
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Horizontal_Bar_Points INTEGER) ### question:What is the average horizontal bar points for all gymnasts?
SELECT AVG(Horizontal_Bar_Points) FROM gymnast
What are the names of people in ascending alphabetical order?
CREATE TABLE People (Name VARCHAR)
SELECT Name FROM People ORDER BY Name
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE People (Name VARCHAR) ### question:What are the names of people in ascending alphabetical order?
SELECT Name FROM People ORDER BY Name
What are the names of gymnasts?
CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) ### question:What are the names of gymnasts?
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID
What are the names of gymnasts whose hometown is not "Santo Domingo"?
CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Hometown VARCHAR)
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> "Santo Domingo"
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Hometown VARCHAR) ### question: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"
What is the age of the tallest person?
CREATE TABLE people (Age VARCHAR, Height VARCHAR)
SELECT Age FROM people ORDER BY Height DESC LIMIT 1
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE people (Age VARCHAR, Height VARCHAR) ### question:What is the age of the tallest person?
SELECT Age FROM people ORDER BY Height DESC LIMIT 1
List the names of the top 5 oldest people.
CREATE TABLE People (Name VARCHAR, Age VARCHAR)
SELECT Name FROM People ORDER BY Age DESC LIMIT 5
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE People (Name VARCHAR, Age VARCHAR) ### question:List the names of the top 5 oldest people.
SELECT Name FROM People ORDER BY Age DESC LIMIT 5
What is the total point count of the youngest gymnast?
CREATE TABLE people (People_ID VARCHAR, Age VARCHAR); CREATE TABLE gymnast (Total_Points VARCHAR, Gymnast_ID VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE people (People_ID VARCHAR, Age VARCHAR); CREATE TABLE gymnast (Total_Points VARCHAR, Gymnast_ID VARCHAR) ### question: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
What is the average age of all gymnasts?
CREATE TABLE people (Age INTEGER, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR)
SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE people (Age INTEGER, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR) ### question: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
What are the distinct hometowns of gymnasts with total points more than 57.5?
CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points INTEGER); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points INTEGER); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) ### question: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
What are the hometowns of gymnasts and the corresponding number of gymnasts?
CREATE TABLE gymnast (Gymnast_ID VARCHAR); 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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) ### question: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
What is the most common hometown of gymnasts?
CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) ### question: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
What are the hometowns that are shared by at least two gymnasts?
CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR) ### question: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
List the names of gymnasts in ascending order by their heights.
CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Height VARCHAR)
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Height VARCHAR) ### question: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
List the distinct hometowns that are not associated with any gymnast.
CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR) ### question: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
Show the hometowns shared by people older than 23 and younger than 20.
CREATE TABLE people (Hometown VARCHAR, Age INTEGER)
SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE people (Hometown VARCHAR, Age INTEGER) ### question: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
How many distinct hometowns did these people have?
CREATE TABLE people (Hometown VARCHAR)
SELECT COUNT(DISTINCT Hometown) FROM people
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE people (Hometown VARCHAR) ### question:How many distinct hometowns did these people have?
SELECT COUNT(DISTINCT Hometown) FROM people
Show the ages of gymnasts in descending order of total points.
CREATE TABLE people (Age VARCHAR, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points VARCHAR)
SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE people (Age VARCHAR, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points VARCHAR) ### question: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
Find the total savings balance of all accounts except the account with name ‘Brown’.
CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR)
SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown'
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR) ### question: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'
How many accounts are there in total?
CREATE TABLE accounts (Id VARCHAR)
SELECT COUNT(*) FROM accounts
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE accounts (Id VARCHAR) ### question:How many accounts are there in total?
SELECT COUNT(*) FROM accounts
What is the total checking balance in all accounts?
CREATE TABLE checking (balance INTEGER)
SELECT SUM(balance) FROM checking
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (balance INTEGER) ### question:What is the total checking balance in all accounts?
SELECT SUM(balance) FROM checking
Find the average checking balance.
CREATE TABLE checking (balance INTEGER)
SELECT AVG(balance) FROM checking
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (balance INTEGER) ### question:Find the average checking balance.
SELECT AVG(balance) FROM checking
How many accounts have a savings balance above the average savings balance?
CREATE TABLE savings (balance INTEGER)
SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings)
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE savings (balance INTEGER) ### question:How many accounts have a savings balance above the average savings balance?
SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings)
Find the name and id of accounts whose checking balance is below the maximum checking balance.
CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TABLE checking (custid VARCHAR, balance INTEGER)
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)
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TABLE checking (custid VARCHAR, balance INTEGER) ### question: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)
What is the checking balance of the account whose owner’s name contains the substring ‘ee’?
CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (custid VARCHAR, name VARCHAR)
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (custid VARCHAR, name VARCHAR) ### question: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%'
Find the checking balance and saving balance in the Brown’s account.
CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR)
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'
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR) ### question: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'
Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.
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)
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)
Translate the question into SQL query by using the schema. ### schema: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) ### question: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)
Find the checking balance of the accounts whose savings balance is higher than the average savings balance.
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)
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))
Translate the question into SQL query by using the schema. ### schema: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) ### question: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))
List all customers’ names in the alphabetical order.
CREATE TABLE accounts (name VARCHAR)
SELECT name FROM accounts ORDER BY name
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE accounts (name VARCHAR) ### question:List all customers’ names in the alphabetical order.
SELECT name FROM accounts ORDER BY name
Find the name of account that has the lowest total checking and saving balance.
CREATE TABLE checking (custid VARCHAR, balance VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (custid VARCHAR, balance VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) ### question: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
Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.
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)
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)
Translate the question into SQL query by using the schema. ### schema: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) ### question: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)
Find the name and checking balance of the account with the lowest savings balance.
CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) ### question: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
Find the number of checking accounts for each account name.
CREATE TABLE checking (custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR)
SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) ### question: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
Find the total saving balance for each account name.
CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR)
SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) ### question: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
Find the name of accounts whose checking balance is below the average checking balance.
CREATE TABLE accounts (name VARCHAR, custid VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TABLE checking (custid VARCHAR, balance INTEGER)
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking)
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE accounts (name VARCHAR, custid VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TABLE checking (custid VARCHAR, balance INTEGER) ### question: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)
Find the saving balance of the account with the highest checking balance.
CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE checking (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (custid VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE checking (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (custid VARCHAR) ### question: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
Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.
CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR)
SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR) ### question: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
Find the name and checking balance of the account with the lowest saving balance.
CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) ### question: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
Find the name, checking balance and saving balance of all accounts in the bank.
CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) ### question: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
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.
CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) ### question: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
Find the name of accounts whose checking balance is higher than corresponding saving balance.
CREATE TABLE savings (custid VARCHAR, balance INTEGER); CREATE TABLE accounts (name VARCHAR, custid VARCHAR); CREATE TABLE checking (custid VARCHAR, balance INTEGER)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE savings (custid VARCHAR, balance INTEGER); CREATE TABLE accounts (name VARCHAR, custid VARCHAR); CREATE TABLE checking (custid VARCHAR, balance INTEGER) ### question: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
Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.
CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) ### question: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
Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.
CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) ### question: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
How many main stream browsers whose market share is at least 5 exist?
CREATE TABLE browser (market_share VARCHAR)
SELECT COUNT(*) FROM browser WHERE market_share >= 5
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE browser (market_share VARCHAR) ### question:How many main stream browsers whose market share is at least 5 exist?
SELECT COUNT(*) FROM browser WHERE market_share >= 5
List the name of browsers in descending order by market share.
CREATE TABLE browser (name VARCHAR, market_share VARCHAR)
SELECT name FROM browser ORDER BY market_share DESC
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE browser (name VARCHAR, market_share VARCHAR) ### question:List the name of browsers in descending order by market share.
SELECT name FROM browser ORDER BY market_share DESC
List the ids, names and market shares of all browsers.
CREATE TABLE browser (id VARCHAR, name VARCHAR, market_share VARCHAR)
SELECT id, name, market_share FROM browser
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE browser (id VARCHAR, name VARCHAR, market_share VARCHAR) ### question:List the ids, names and market shares of all browsers.
SELECT id, name, market_share FROM browser
What is the maximum, minimum and average market share of the listed browsers?
CREATE TABLE browser (market_share INTEGER)
SELECT MAX(market_share), MIN(market_share), AVG(market_share) FROM browser
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE browser (market_share INTEGER) ### question: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
What is the id and market share of the browser Safari?
CREATE TABLE browser (id VARCHAR, market_share VARCHAR, name VARCHAR)
SELECT id, market_share FROM browser WHERE name = 'Safari'
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE browser (id VARCHAR, market_share VARCHAR, name VARCHAR) ### question:What is the id and market share of the browser Safari?
SELECT id, market_share FROM browser WHERE name = 'Safari'
What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?
CREATE TABLE web_client_accelerator (name VARCHAR, operating_system VARCHAR, CONNECTION VARCHAR)
SELECT name, operating_system FROM web_client_accelerator WHERE CONNECTION <> 'Broadband'
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE web_client_accelerator (name VARCHAR, operating_system VARCHAR, CONNECTION VARCHAR) ### question: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'
What is the name of the browser that became compatible with the accelerator 'CProxy' after 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)
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
Translate the question into SQL query by using the schema. ### schema: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) ### question: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
What are the ids and names of the web accelerators that are compatible with two or more browsers?
CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, Name VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, Name VARCHAR) ### question: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
What is the id and name of the browser that is compatible with the most web accelerators?
CREATE TABLE browser (id VARCHAR, name VARCHAR); CREATE TABLE accelerator_compatible_browser (browser_id VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE browser (id VARCHAR, name VARCHAR); CREATE TABLE accelerator_compatible_browser (browser_id VARCHAR) ### question: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
When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?
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)
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'
Translate the question into SQL query by using the schema. ### schema: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) ### question: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'
How many different kinds of clients are supported by the web clients accelerators?
CREATE TABLE web_client_accelerator (client VARCHAR)
SELECT COUNT(DISTINCT client) FROM web_client_accelerator
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE web_client_accelerator (client VARCHAR) ### question:How many different kinds of clients are supported by the web clients accelerators?
SELECT COUNT(DISTINCT client) FROM web_client_accelerator
How many accelerators are not compatible with the browsers listed ?
CREATE TABLE accelerator_compatible_browser (id VARCHAR, accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, accelerator_id VARCHAR)
SELECT COUNT(*) FROM web_client_accelerator WHERE NOT id IN (SELECT accelerator_id FROM accelerator_compatible_browser)
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE accelerator_compatible_browser (id VARCHAR, accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, accelerator_id VARCHAR) ### question: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)
What distinct accelerator names are compatible with the browswers that have market share higher than 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)
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
Translate the question into SQL query by using the schema. ### schema: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) ### question: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
List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.
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)
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 JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'Fasterfox'
Translate the question into SQL query by using the schema. ### schema: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) ### question: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 JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'Fasterfox'
Show the accelerator names and supporting operating systems that are not compatible with the browser named '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)
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'
Translate the question into SQL query by using the schema. ### schema: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) ### question: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'
Which accelerator name contains substring "Opera"?
CREATE TABLE web_client_accelerator (name VARCHAR)
SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%"
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE web_client_accelerator (name VARCHAR) ### question:Which accelerator name contains substring "Opera"?
SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%"
Find the number of web accelerators used for each Operating system.
CREATE TABLE web_client_accelerator (Operating_system VARCHAR)
SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE web_client_accelerator (Operating_system VARCHAR) ### question:Find the number of web accelerators used for each Operating system.
SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system
give me names of all compatible browsers and accelerators in the descending order of compatible year
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)
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
Translate the question into SQL query by using the schema. ### schema: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) ### question: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
How many wrestlers are there?
CREATE TABLE wrestler (Id VARCHAR)
SELECT COUNT(*) FROM wrestler
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Id VARCHAR) ### question:How many wrestlers are there?
SELECT COUNT(*) FROM wrestler
List the names of wrestlers in descending order of days held.
CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR)
SELECT Name FROM wrestler ORDER BY Days_held DESC
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR) ### question:List the names of wrestlers in descending order of days held.
SELECT Name FROM wrestler ORDER BY Days_held DESC
What is the name of the wrestler with the fewest days held?
CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR)
SELECT Name FROM wrestler ORDER BY Days_held LIMIT 1
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Name VARCHAR, Days_held VARCHAR) ### question:What is the name of the wrestler with the fewest days held?
SELECT Name FROM wrestler ORDER BY Days_held LIMIT 1
What are the distinct reigns of wrestlers whose location is not "Tokyo,Japan" ?
CREATE TABLE wrestler (Reign VARCHAR, LOCATION VARCHAR)
SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> "Tokyo , Japan"
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Reign VARCHAR, LOCATION VARCHAR) ### question:What are the distinct reigns of wrestlers whose location is not "Tokyo,Japan" ?
SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> "Tokyo , Japan"
What are the names and location of the wrestlers?
CREATE TABLE wrestler (Name VARCHAR, LOCATION VARCHAR)
SELECT Name, LOCATION FROM wrestler
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Name VARCHAR, LOCATION VARCHAR) ### question:What are the names and location of the wrestlers?
SELECT Name, LOCATION FROM wrestler
What are the elimination moves of wrestlers whose team is "Team Orton"?
CREATE TABLE Elimination (Elimination_Move VARCHAR, Team VARCHAR)
SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton"
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE Elimination (Elimination_Move VARCHAR, Team VARCHAR) ### question:What are the elimination moves of wrestlers whose team is "Team Orton"?
SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton"
What are the names of wrestlers and the elimination moves?
CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE elimination (Elimination_Move VARCHAR, Wrestler_ID VARCHAR)
SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE elimination (Elimination_Move VARCHAR, Wrestler_ID VARCHAR) ### question: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
List the names of wrestlers and the teams in elimination in descending order of days held.
CREATE TABLE elimination (Team VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR, Days_held VARCHAR)
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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE elimination (Team VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR, Days_held VARCHAR) ### question: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
List the time of elimination of the wrestlers with largest days held.
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 ORDER BY T2.Days_held DESC LIMIT 1
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held VARCHAR); CREATE TABLE elimination (Time VARCHAR, Wrestler_ID VARCHAR) ### question: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
Show times of elimination of wrestlers with days held more than 50.
CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held INTEGER); 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
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held INTEGER); CREATE TABLE elimination (Time VARCHAR, Wrestler_ID VARCHAR) ### question: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
Show different teams in eliminations and the number of eliminations from each team.
CREATE TABLE elimination (Team VARCHAR)
SELECT Team, COUNT(*) FROM elimination GROUP BY Team
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE elimination (Team VARCHAR) ### question:Show different teams in eliminations and the number of eliminations from each team.
SELECT Team, COUNT(*) FROM elimination GROUP BY Team
Show teams that have suffered more than three eliminations.
CREATE TABLE elimination (Team VARCHAR)
SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE elimination (Team VARCHAR) ### question:Show teams that have suffered more than three eliminations.
SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3
Show the reign and days held of wrestlers.
CREATE TABLE wrestler (Reign VARCHAR, Days_held VARCHAR)
SELECT Reign, Days_held FROM wrestler
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Reign VARCHAR, Days_held VARCHAR) ### question:Show the reign and days held of wrestlers.
SELECT Reign, Days_held FROM wrestler
What are the names of wrestlers days held less than 100?
CREATE TABLE wrestler (Name VARCHAR, Days_held INTEGER)
SELECT Name FROM wrestler WHERE Days_held < 100
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Name VARCHAR, Days_held INTEGER) ### question:What are the names of wrestlers days held less than 100?
SELECT Name FROM wrestler WHERE Days_held < 100
Please show the most common reigns of wrestlers.
CREATE TABLE wrestler (Reign VARCHAR)
SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (Reign VARCHAR) ### question:Please show the most common reigns of wrestlers.
SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1
List the locations that are shared by more than two wrestlers.
CREATE TABLE wrestler (LOCATION VARCHAR)
SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE wrestler (LOCATION VARCHAR) ### question:List the locations that are shared by more than two wrestlers.
SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2
List the names of wrestlers that have not been eliminated.
CREATE TABLE elimination (Name VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR)
SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination)
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE elimination (Name VARCHAR, Wrestler_ID VARCHAR); CREATE TABLE wrestler (Name VARCHAR, Wrestler_ID VARCHAR) ### question:List the names of wrestlers that have not been eliminated.
SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination)
Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin".
CREATE TABLE Elimination (Team VARCHAR, Eliminated_By VARCHAR)
SELECT Team FROM Elimination WHERE Eliminated_By = "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = "Benjamin"
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE Elimination (Team VARCHAR, Eliminated_By VARCHAR) ### question: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"
What is the number of distinct teams that suffer elimination?
CREATE TABLE elimination (team VARCHAR)
SELECT COUNT(DISTINCT team) FROM elimination
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE elimination (team VARCHAR) ### question:What is the number of distinct teams that suffer elimination?
SELECT COUNT(DISTINCT team) FROM elimination
Show the times of elimination by "Punk" or "Orton".
CREATE TABLE elimination (TIME VARCHAR, Eliminated_By VARCHAR)
SELECT TIME FROM elimination WHERE Eliminated_By = "Punk" OR Eliminated_By = "Orton"
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE elimination (TIME VARCHAR, Eliminated_By VARCHAR) ### question:Show the times of elimination by "Punk" or "Orton".
SELECT TIME FROM elimination WHERE Eliminated_By = "Punk" OR Eliminated_By = "Orton"
How many schools are there?
CREATE TABLE school (Id VARCHAR)
SELECT COUNT(*) FROM school
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE school (Id VARCHAR) ### question:How many schools are there?
SELECT COUNT(*) FROM school
Show all school names in alphabetical order.
CREATE TABLE school (school_name VARCHAR)
SELECT school_name FROM school ORDER BY school_name
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE school (school_name VARCHAR) ### question:Show all school names in alphabetical order.
SELECT school_name FROM school ORDER BY school_name
List the name, location, mascot for all schools.
CREATE TABLE school (school_name VARCHAR, LOCATION VARCHAR, mascot VARCHAR)
SELECT school_name, LOCATION, mascot FROM school
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE school (school_name VARCHAR, LOCATION VARCHAR, mascot VARCHAR) ### question:List the name, location, mascot for all schools.
SELECT school_name, LOCATION, mascot FROM school
What are the total and average enrollment of all schools?
CREATE TABLE school (enrollment INTEGER)
SELECT SUM(enrollment), AVG(enrollment) FROM school
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE school (enrollment INTEGER) ### question:What are the total and average enrollment of all schools?
SELECT SUM(enrollment), AVG(enrollment) FROM school
What are the mascots for schools with enrollments above the average?
CREATE TABLE school (mascot VARCHAR, enrollment INTEGER)
SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school)
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE school (mascot VARCHAR, enrollment INTEGER) ### question:What are the mascots for schools with enrollments above the average?
SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school)
List the name of the school with the smallest enrollment.
CREATE TABLE school (school_name VARCHAR, enrollment VARCHAR)
SELECT school_name FROM school ORDER BY enrollment LIMIT 1
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE school (school_name VARCHAR, enrollment VARCHAR) ### question:List the name of the school with the smallest enrollment.
SELECT school_name FROM school ORDER BY enrollment LIMIT 1
Show the average, maximum, minimum enrollment of all schools.
CREATE TABLE school (enrollment INTEGER)
SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE school (enrollment INTEGER) ### question:Show the average, maximum, minimum enrollment of all schools.
SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school
Show each county along with the number of schools and total enrollment in each county.
CREATE TABLE school (county VARCHAR, enrollment INTEGER)
SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE school (county VARCHAR, enrollment INTEGER) ### question: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
How many donors have endowment for school named "Glenn"?
CREATE TABLE school (school_id VARCHAR, school_name VARCHAR); CREATE TABLE endowment (donator_name VARCHAR, school_id VARCHAR)
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"
Translate the question into SQL query by using the schema. ### schema:CREATE TABLE school (school_id VARCHAR, school_name VARCHAR); CREATE TABLE endowment (donator_name VARCHAR, school_id VARCHAR) ### question: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"