db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
small_bank_1
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)
Question: find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.
small_bank_1
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)
Question: what are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?
small_bank_1
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
Question: find the name and checking balance of the account with the lowest savings balance. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the name and checking balance of the account with the lowest savings balance.
small_bank_1
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
Question: what are the names and balances of checking accounts belonging to the customer with the lowest savings balance? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what are the names and balances of checking accounts belonging to the customer with the lowest savings balance?
small_bank_1
select count(*) , t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid group by t1.name
Question: find the number of checking accounts for each account name. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the number of checking accounts for each account name.
small_bank_1
select count(*) , t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid group by t1.name
Question: what are the names of customers with accounts, and how many checking accounts do each of them have? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what are the names of customers with accounts, and how many checking accounts do each of them have?
small_bank_1
select sum(t2.balance) , t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid group by t1.name
Question: find the total saving balance for each account name. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the total saving balance for each account name.
small_bank_1
select sum(t2.balance) , t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid group by t1.name
Question: what are the names of customers with accounts, and what are the total savings balances for each? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what are the names of customers with accounts, and what are the total savings balances for each?
small_bank_1
select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid where t2.balance < (select avg(balance) from checking)
Question: find the name of accounts whose checking balance is below the average checking balance. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the name of accounts whose checking balance is below the average checking balance.
small_bank_1
select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid where t2.balance < (select avg(balance) from checking)
Question: what are the names of customers with checking balances lower than the average checking balance? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what are the names of customers with checking balances lower than the average checking balance?
small_bank_1
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
Question: find the saving balance of the account with the highest checking balance. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the saving balance of the account with the highest checking balance.
small_bank_1
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
Question: what is the savings balance of the account belonging to the customer with the highest checking balance? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what is the savings balance of the account belonging to the customer with the highest checking balance?
small_bank_1
select t1.balance + t2.balance from checking as t1 join savings as t2 on t1.custid = t2.custid order by t1.balance + t2.balance
Question: find the total checking and saving balance of all accounts sorted by the total balance in ascending order. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the total checking and saving balance of all accounts sorted by the total balance in ascending order.
small_bank_1
select t1.balance + t2.balance from checking as t1 join savings as t2 on t1.custid = t2.custid order by t1.balance + t2.balance
Question: what is the sum of checking and savings balances for all customers, ordered by the total balance? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what is the sum of checking and savings balances for all customers, ordered by the total balance?
small_bank_1
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
Question: find the name and checking balance of the account with the lowest saving balance. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the name and checking balance of the account with the lowest saving balance.
small_bank_1
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
Question: what is the name and checking balance of the account which has the lowest savings balance? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what is the name and checking balance of the account which has the lowest savings balance?
small_bank_1
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
Question: find the name, checking balance and saving balance of all accounts in the bank. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the name, checking balance and saving balance of all accounts in the bank.
small_bank_1
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
Question: what are the names, checking balances, and savings balances for all customers? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what are the names, checking balances, and savings balances for all customers?
small_bank_1
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
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. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCO...
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.
small_bank_1
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
Question: what are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?
small_bank_1
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
Question: find the name of accounts whose checking balance is higher than corresponding saving balance. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the name of accounts whose checking balance is higher than corresponding saving balance.
small_bank_1
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
Question: what are the names of customers with a higher checking balance than savings balance? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what are the names of customers with a higher checking balance than savings balance?
small_bank_1
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
Question: find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.
small_bank_1
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
Question: what are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ...
what are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances?
small_bank_1
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
Question: find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order. | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.
small_bank_1
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
Question: what are names and savings balances of the three accounts with the highest savings balances? | Tables: ACCOUNTS -> custid, name. SAVINGS -> custid, balance. CHECKING -> custid, balance. | Joins: SAVINGS.custid = ACCOUNTS.custid, CHECKING.custid = ACCOUNTS.custid,
what are names and savings balances of the three accounts with the highest savings balances?
browser_web
select count(*) from browser where market_share >= 5
Question: how many main stream browsers whose market share is at least 5 exist? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accelerator_compatible_brow...
how many main stream browsers whose market share is at least 5 exist?
browser_web
select name from browser order by market_share desc
Question: list the name of browsers in descending order by market share. | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accelerator_compatible_browser.bro...
list the name of browsers in descending order by market share.
browser_web
select id , name , market_share from browser
Question: list the ids, names and market shares of all browsers. | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accelerator_compatible_browser.browser_id ...
list the ids, names and market shares of all browsers.
browser_web
select max(market_share) , min(market_share) , avg(market_share) from browser
Question: what is the maximum, minimum and average market share of the listed browsers? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accelerator_compati...
what is the maximum, minimum and average market share of the listed browsers?
browser_web
select id , market_share from browser where name = 'safari'
Question: what is the id and market share of the browser safari? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accelerator_compatible_browser.browser_id ...
what is the id and market share of the browser safari?
browser_web
select name , operating_system from web_client_accelerator where connection != 'broadband'
Question: what are the name and os of web client accelerators that do not work with only a 'broadband' type connection? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_ye...
what are the name and os of web client accelerators that do not work with only a 'broadband' type connection?
browser_web
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
Question: what is the name of the browser that became compatible with the accelerator 'cproxy' after year 1998 ? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | J...
what is the name of the browser that became compatible with the accelerator 'cproxy' after year 1998 ?
browser_web
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
Question: what are the ids and names of the web accelerators that are compatible with two or more browsers? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins:...
what are the ids and names of the web accelerators that are compatible with two or more browsers?
browser_web
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
Question: what is the id and name of the browser that is compatible with the most web accelerators? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: acceler...
what is the id and name of the browser that is compatible with the most web accelerators?
browser_web
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'
Question: when did the web accelerator 'cachebox' and browser 'internet explorer' become compatible? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accele...
when did the web accelerator 'cachebox' and browser 'internet explorer' become compatible?
browser_web
select count(distinct client) from web_client_accelerator
Question: how many different kinds of clients are supported by the web clients accelerators? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accelerator_co...
how many different kinds of clients are supported by the web clients accelerators?
browser_web
select count(*) from web_client_accelerator where id not in ( select accelerator_id from accelerator_compatible_browser );
Question: how many accelerators are not compatible with the browsers listed ? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accelerator_compatible_browse...
how many accelerators are not compatible with the browsers listed ?
browser_web
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;
Question: what distinct accelerator names are compatible with the browswers that have market share higher than 15? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. |...
what distinct accelerator names are compatible with the browswers that have market share higher than 15?
browser_web
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 ...
Question: list the names of the browser that are compatible with both 'cachebox' and 'fasterfox'. | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accelerat...
list the names of the browser that are compatible with both 'cachebox' and 'fasterfox'.
browser_web
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'
Question: show the accelerator names and supporting operating systems that are not compatible with the browser named 'opera'. | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_si...
show the accelerator names and supporting operating systems that are not compatible with the browser named 'opera'.
browser_web
select name from web_client_accelerator where name like '%opera%'
Question: which accelerator name contains substring 'opera'? | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accelerator_compatible_browser.browser_id = br...
which accelerator name contains substring 'opera'?
browser_web
select operating_system , count(*) from web_client_accelerator group by operating_system
Question: find the number of web accelerators used for each operating system. | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joins: accelerator_compatible_browse...
find the number of web accelerators used for each operating system.
browser_web
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
Question: give me names of all compatible browsers and accelerators in the descending order of compatible year | Tables: Web_client_accelerator -> id, name, Operating_system, Client, Connection. browser -> id, name, market_share. accelerator_compatible_browser -> accelerator_id, browser_id, compatible_since_year. | Joi...
give me names of all compatible browsers and accelerators in the descending order of compatible year
wrestler
select count(*) from wrestler
Question: how many wrestlers are there? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
how many wrestlers are there?
wrestler
select count(*) from wrestler
Question: count the number of wrestlers. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
count the number of wrestlers.
wrestler
select name from wrestler order by days_held desc
Question: list the names of wrestlers in descending order of days held. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
list the names of wrestlers in descending order of days held.
wrestler
select name from wrestler order by days_held desc
Question: what are the names of the wrestlers, ordered descending by days held? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what are the names of the wrestlers, ordered descending by days held?
wrestler
select name from wrestler order by days_held asc limit 1
Question: what is the name of the wrestler with the fewest days held? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what is the name of the wrestler with the fewest days held?
wrestler
select name from wrestler order by days_held asc limit 1
Question: return the name of the wrestler who had the lowest number of days held. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
return the name of the wrestler who had the lowest number of days held.
wrestler
select distinct reign from wrestler where location != 'tokyo , japan'
Question: what are the distinct reigns of wrestlers whose location is not 'tokyo,japan' ? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what are the distinct reigns of wrestlers whose location is not 'tokyo,japan' ?
wrestler
select distinct reign from wrestler where location != 'tokyo , japan'
Question: give the different reigns of wrestlers who are not located in tokyo, japan. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
give the different reigns of wrestlers who are not located in tokyo, japan.
wrestler
select name , location from wrestler
Question: what are the names and location of the wrestlers? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what are the names and location of the wrestlers?
wrestler
select name , location from wrestler
Question: give the names and locations of all wrestlers. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
give the names and locations of all wrestlers.
wrestler
select elimination_move from elimination where team = 'team orton'
Question: what are the elimination moves of wrestlers whose team is 'team orton'? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what are the elimination moves of wrestlers whose team is 'team orton'?
wrestler
select elimination_move from elimination where team = 'team orton'
Question: return the elimination movies of wrestlers on team orton. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
return the elimination movies of wrestlers on team orton.
wrestler
select t2.name , t1.elimination_move from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id
Question: what are the names of wrestlers and the elimination moves? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what are the names of wrestlers and the elimination moves?
wrestler
select t2.name , t1.elimination_move from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id
Question: give the names of wrestlers and their elimination moves. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
give the names of wrestlers and their elimination moves.
wrestler
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
Question: list the names of wrestlers and the teams in elimination in descending order of days held. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_I...
list the names of wrestlers and the teams in elimination in descending order of days held.
wrestler
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
Question: what are the names of wrestlers and their teams in elimination, ordered descending by days held? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wres...
what are the names of wrestlers and their teams in elimination, ordered descending by days held?
wrestler
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
Question: list the time of elimination of the wrestlers with largest days held. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
list the time of elimination of the wrestlers with largest days held.
wrestler
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
Question: what is the time of elimination for the wrestler with the most days held? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what is the time of elimination for the wrestler with the most days held?
wrestler
select t1.time from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id where t2.days_held > 50
Question: show times of elimination of wrestlers with days held more than 50. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
show times of elimination of wrestlers with days held more than 50.
wrestler
select t1.time from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id where t2.days_held > 50
Question: what are the times of elimination for wrestlers with over 50 days held? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what are the times of elimination for wrestlers with over 50 days held?
wrestler
select team , count(*) from elimination group by team
Question: show different teams in eliminations and the number of eliminations from each team. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
show different teams in eliminations and the number of eliminations from each team.
wrestler
select team , count(*) from elimination group by team
Question: how many eliminations did each team have? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
how many eliminations did each team have?
wrestler
select team from elimination group by team having count(*) > 3
Question: show teams that have suffered more than three eliminations. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
show teams that have suffered more than three eliminations.
wrestler
select team from elimination group by team having count(*) > 3
Question: which teams had more than 3 eliminations? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
which teams had more than 3 eliminations?
wrestler
select reign , days_held from wrestler
Question: show the reign and days held of wrestlers. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
show the reign and days held of wrestlers.
wrestler
select reign , days_held from wrestler
Question: what are the reigns and days held of all wrestlers? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what are the reigns and days held of all wrestlers?
wrestler
select name from wrestler where days_held < 100
Question: what are the names of wrestlers days held less than 100? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what are the names of wrestlers days held less than 100?
wrestler
select name from wrestler where days_held < 100
Question: return the names of wrestlers with fewer than 100 days held. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
return the names of wrestlers with fewer than 100 days held.
wrestler
select reign from wrestler group by reign order by count(*) desc limit 1
Question: please show the most common reigns of wrestlers. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
please show the most common reigns of wrestlers.
wrestler
select reign from wrestler group by reign order by count(*) desc limit 1
Question: which reign is the most common among wrestlers? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
which reign is the most common among wrestlers?
wrestler
select location from wrestler group by location having count(*) > 2
Question: list the locations that are shared by more than two wrestlers. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
list the locations that are shared by more than two wrestlers.
wrestler
select location from wrestler group by location having count(*) > 2
Question: which locations are shared by more than two wrestlers? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
which locations are shared by more than two wrestlers?
wrestler
select name from wrestler where wrestler_id not in (select wrestler_id from elimination)
Question: list the names of wrestlers that have not been eliminated. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
list the names of wrestlers that have not been eliminated.
wrestler
select name from wrestler where wrestler_id not in (select wrestler_id from elimination)
Question: what are the names of wrestlers who have never been eliminated? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what are the names of wrestlers who have never been eliminated?
wrestler
select team from elimination where eliminated_by = 'orton' intersect select team from elimination where eliminated_by = 'benjamin'
Question: show the teams that have both wrestlers eliminated by 'orton' and wrestlers eliminated by 'benjamin'. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler...
show the teams that have both wrestlers eliminated by 'orton' and wrestlers eliminated by 'benjamin'.
wrestler
select team from elimination where eliminated_by = 'orton' intersect select team from elimination where eliminated_by = 'benjamin'
Question: what are the teams that have both wrestlers eliminated by orton and wrestlers eliminated by benjamin? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler...
what are the teams that have both wrestlers eliminated by orton and wrestlers eliminated by benjamin?
wrestler
select count (distinct team) from elimination
Question: what is the number of distinct teams that suffer elimination? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
what is the number of distinct teams that suffer elimination?
wrestler
select count (distinct team) from elimination
Question: how many different teams have had eliminated wrestlers? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
how many different teams have had eliminated wrestlers?
wrestler
select time from elimination where eliminated_by = 'punk' or eliminated_by = 'orton'
Question: show the times of elimination by 'punk' or 'orton'. | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestler.Wrestler_ID,
show the times of elimination by 'punk' or 'orton'.
wrestler
select time from elimination where eliminated_by = 'punk' or eliminated_by = 'orton'
Question: what are the times of elimination for any instances in which the elimination was done by punk or orton? | Tables: wrestler -> Wrestler_ID, Name, Reign, Days_held, Location, Event. Elimination -> Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time. | Joins: Elimination.Wrestler_ID = wrestl...
what are the times of elimination for any instances in which the elimination was done by punk or orton?
school_finance
select count(*) from school
Question: how many schools are there? | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested_percent. endowment -> endowment_id, Scho...
how many schools are there?
school_finance
select count(*) from school
Question: count the number of schools. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested_percent. endowment -> endowment_id, Sch...
count the number of schools.
school_finance
select school_name from school order by school_name
Question: show all school names in alphabetical order. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested_percent. endowment -> e...
show all school names in alphabetical order.
school_finance
select school_name , location , mascot from school
Question: list the name, location, mascot for all schools. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested_percent. endowment ...
list the name, location, mascot for all schools.
school_finance
select sum(enrollment) , avg(enrollment) from school
Question: what are the total and average enrollment of all schools? | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested_percent. e...
what are the total and average enrollment of all schools?
school_finance
select mascot from school where enrollment > (select avg(enrollment) from school)
Question: what are the mascots for schools with enrollments above the average? | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested...
what are the mascots for schools with enrollments above the average?
school_finance
select school_name from school order by enrollment limit 1
Question: list the name of the school with the smallest enrollment. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested_percent. e...
list the name of the school with the smallest enrollment.
school_finance
select avg(enrollment) , max(enrollment) , min(enrollment) from school
Question: show the average, maximum, minimum enrollment of all schools. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested_percen...
show the average, maximum, minimum enrollment of all schools.
school_finance
select county , count(*) , sum(enrollment) from school group by county
Question: show each county along with the number of schools and total enrollment in each county. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_investe...
show each county along with the number of schools and total enrollment in each county.
school_finance
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'
Question: how many donors have endowment for school named 'glenn'? | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested_percent. en...
how many donors have endowment for school named 'glenn'?
school_finance
select donator_name , sum(amount) from endowment group by donator_name order by sum(amount) desc
Question: list each donator name and the amount of endowment in descending order of the amount of endowment. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_per...
list each donator name and the amount of endowment in descending order of the amount of endowment.
school_finance
select school_name from school where school_id not in (select school_id from endowment)
Question: list the names of the schools without any endowment. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested_percent. endowm...
list the names of the schools without any endowment.
school_finance
select t2.school_name from endowment as t1 join school as t2 on t1.school_id = t2.school_id group by t1.school_id having sum(t1.amount) <= 10
Question: list all the names of schools with an endowment amount smaller than or equal to 10. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, ...
list all the names of schools with an endowment amount smaller than or equal to 10.
school_finance
select t1.donator_name from endowment as t1 join school as t2 on t1.school_id = t2.school_id where t2.school_name = 'glenn' intersect select t1.donator_name from endowment as t1 join school as t2 on t1.school_id = t2.school_id where t2.school_name = 'triton'
Question: show the names of donors who donated to both school 'glenn' and 'triton.' | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_inv...
show the names of donors who donated to both school 'glenn' and 'triton.'
school_finance
select donator_name from endowment except select donator_name from endowment where amount < 9
Question: show the names of all the donors except those whose donation amount less than 9. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Bud...
show the names of all the donors except those whose donation amount less than 9.
school_finance
select amount , donator_name from endowment order by amount desc limit 1
Question: list the amount and donor name for the largest amount of donation. | Tables: School -> School_id, School_name, Location, Mascot, Enrollment, IHSAA_Class, IHSAA_Football_Class, County. budget -> School_id, Year, Budgeted, total_budget_percent_budgeted, Invested, total_budget_percent_invested, Budget_invested_p...
list the amount and donor name for the largest amount of donation.