db_name
stringclasses 146
values | prompt
stringlengths 310
4.81k
|
---|---|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.
#
### SQL:
#
# 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)
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?
#
### SQL:
#
# 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)
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the name and checking balance of the account with the lowest savings balance.
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the number of checking accounts for each account name.
#
### SQL:
#
# SELECT count(*) , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What are the names of customers with accounts, and how many checking accounts do each of them have?
#
### SQL:
#
# SELECT count(*) , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the total saving balance for each account name.
#
### SQL:
#
# SELECT sum(T2.balance) , T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What are the names of customers with accounts, and what are the total savings balances for each?
#
### SQL:
#
# SELECT sum(T2.balance) , T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the name of accounts whose checking balance is below the average checking balance.
#
### SQL:
#
# SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM checking)
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What are the names of customers with checking balances lower than the average checking balance?
#
### SQL:
#
# SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM checking)
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the saving balance of the account with the highest checking balance.
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What is the savings balance of the account belonging to the customer with the highest checking balance?
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.
#
### SQL:
#
# SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What is the sum of checking and savings balances for all customers, ordered by the total balance?
#
### SQL:
#
# SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the name and checking balance of the account with the lowest saving balance.
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What is the name and checking balance of the account which has the lowest savings balance?
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the name, checking balance and saving balance of all accounts in the bank.
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What are the names, checking balances, and savings balances for all customers?
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### 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.
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the name of accounts whose checking balance is higher than corresponding saving balance.
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What are the names of customers with a higher checking balance than savings balance?
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### 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?
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.
#
### SQL:
#
# 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
#
### End.
|
small_bank_1
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# ACCOUNTS ( custid, name )
# SAVINGS ( custid, balance )
# CHECKING ( custid, balance )
#
# SAVINGS.custid can be joined with ACCOUNTS.custid
# CHECKING.custid can be joined with ACCOUNTS.custid
#
### Question:
#
# What are names and savings balances of the three accounts with the highest savings balances?
#
### SQL:
#
# 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
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# How many main stream browsers whose market share is at least 5 exist?
#
### SQL:
#
# SELECT count(*) FROM browser WHERE market_share >= 5
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# List the name of browsers in descending order by market share.
#
### SQL:
#
# SELECT name FROM browser ORDER BY market_share DESC
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# List the ids, names and market shares of all browsers.
#
### SQL:
#
# SELECT id , name , market_share FROM browser
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# What is the maximum, minimum and average market share of the listed browsers?
#
### SQL:
#
# SELECT max(market_share) , min(market_share) , avg(market_share) FROM browser
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# What is the id and market share of the browser Safari?
#
### SQL:
#
# SELECT id , market_share FROM browser WHERE name = 'Safari'
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?
#
### SQL:
#
# SELECT name , operating_system FROM web_client_accelerator WHERE CONNECTION != 'Broadband'
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?
#
### SQL:
#
# 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
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# What are the ids and names of the web accelerators that are compatible with two or more browsers?
#
### SQL:
#
# 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
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# What is the id and name of the browser that is compatible with the most web accelerators?
#
### SQL:
#
# 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
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?
#
### SQL:
#
# 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'
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# How many different kinds of clients are supported by the web clients accelerators?
#
### SQL:
#
# SELECT count(DISTINCT client) FROM web_client_accelerator
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# How many accelerators are not compatible with the browsers listed ?
#
### SQL:
#
# SELECT count(*) FROM web_client_accelerator WHERE id NOT IN ( SELECT accelerator_id FROM accelerator_compatible_browser );
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# What distinct accelerator names are compatible with the browswers that have market share higher than 15?
#
### SQL:
#
# 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;
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.
#
### SQL:
#
# 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'
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.
#
### SQL:
#
# 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'
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# Which accelerator name contains substring "Opera"?
#
### SQL:
#
# SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%"
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# Find the number of web accelerators used for each Operating system.
#
### SQL:
#
# SELECT Operating_system , count(*) FROM web_client_accelerator GROUP BY Operating_system
#
### End.
|
browser_web
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# Web_client_accelerator ( id, name, Operating_system, Client, Connection )
# browser ( id, name, market_share )
# accelerator_compatible_browser ( accelerator_id, browser_id, compatible_since_year )
#
# accelerator_compatible_browser.browser_id can be joined with browser.id
# accelerator_compatible_browser.accelerator_id can be joined with Web_client_accelerator.id
#
### Question:
#
# give me names of all compatible browsers and accelerators in the descending order of compatible year
#
### SQL:
#
# 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
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# How many wrestlers are there?
#
### SQL:
#
# SELECT count(*) FROM wrestler
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Count the number of wrestlers.
#
### SQL:
#
# SELECT count(*) FROM wrestler
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# List the names of wrestlers in descending order of days held.
#
### SQL:
#
# SELECT Name FROM wrestler ORDER BY Days_held DESC
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the names of the wrestlers, ordered descending by days held?
#
### SQL:
#
# SELECT Name FROM wrestler ORDER BY Days_held DESC
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What is the name of the wrestler with the fewest days held?
#
### SQL:
#
# SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Return the name of the wrestler who had the lowest number of days held.
#
### SQL:
#
# SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the distinct reigns of wrestlers whose location is not "Tokyo,Japan" ?
#
### SQL:
#
# SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != "Tokyo , Japan"
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Give the different reigns of wrestlers who are not located in Tokyo, Japan.
#
### SQL:
#
# SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != "Tokyo , Japan"
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the names and location of the wrestlers?
#
### SQL:
#
# SELECT Name , LOCATION FROM wrestler
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Give the names and locations of all wrestlers.
#
### SQL:
#
# SELECT Name , LOCATION FROM wrestler
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the elimination moves of wrestlers whose team is "Team Orton"?
#
### SQL:
#
# SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton"
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Return the elimination movies of wrestlers on Team Orton.
#
### SQL:
#
# SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton"
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the names of wrestlers and the elimination moves?
#
### SQL:
#
# SELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Give the names of wrestlers and their elimination moves.
#
### SQL:
#
# SELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# List the names of wrestlers and the teams in elimination in descending order of days held.
#
### SQL:
#
# 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
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the names of wrestlers and their teams in elimination, ordered descending by days held?
#
### SQL:
#
# 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
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# List the time of elimination of the wrestlers with largest days held.
#
### SQL:
#
# 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
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What is the time of elimination for the wrestler with the most days held?
#
### SQL:
#
# 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
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Show times of elimination of wrestlers with days held more than 50.
#
### SQL:
#
# SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the times of elimination for wrestlers with over 50 days held?
#
### SQL:
#
# SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Show different teams in eliminations and the number of eliminations from each team.
#
### SQL:
#
# SELECT Team , COUNT(*) FROM elimination GROUP BY Team
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# How many eliminations did each team have?
#
### SQL:
#
# SELECT Team , COUNT(*) FROM elimination GROUP BY Team
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Show teams that have suffered more than three eliminations.
#
### SQL:
#
# SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Which teams had more than 3 eliminations?
#
### SQL:
#
# SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Show the reign and days held of wrestlers.
#
### SQL:
#
# SELECT Reign , Days_held FROM wrestler
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the reigns and days held of all wrestlers?
#
### SQL:
#
# SELECT Reign , Days_held FROM wrestler
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the names of wrestlers days held less than 100?
#
### SQL:
#
# SELECT Name FROM wrestler WHERE Days_held < 100
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Return the names of wrestlers with fewer than 100 days held.
#
### SQL:
#
# SELECT Name FROM wrestler WHERE Days_held < 100
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Please show the most common reigns of wrestlers.
#
### SQL:
#
# SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Which reign is the most common among wrestlers?
#
### SQL:
#
# SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# List the locations that are shared by more than two wrestlers.
#
### SQL:
#
# SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Which locations are shared by more than two wrestlers?
#
### SQL:
#
# SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# List the names of wrestlers that have not been eliminated.
#
### SQL:
#
# SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the names of wrestlers who have never been eliminated?
#
### SQL:
#
# SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin".
#
### SQL:
#
# SELECT Team FROM Elimination WHERE Eliminated_By = "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = "Benjamin"
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?
#
### SQL:
#
# SELECT Team FROM Elimination WHERE Eliminated_By = "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = "Benjamin"
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What is the number of distinct teams that suffer elimination?
#
### SQL:
#
# SELECT COUNT (DISTINCT team) FROM elimination
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# How many different teams have had eliminated wrestlers?
#
### SQL:
#
# SELECT COUNT (DISTINCT team) FROM elimination
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# Show the times of elimination by "Punk" or "Orton".
#
### SQL:
#
# SELECT TIME FROM elimination WHERE Eliminated_By = "Punk" OR Eliminated_By = "Orton"
#
### End.
|
wrestler
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# wrestler ( Wrestler_ID, Name, Reign, Days_held, Location, Event )
# Elimination ( Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time )
#
# Elimination.Wrestler_ID can be joined with wrestler.Wrestler_ID
#
### Question:
#
# What are the times of elimination for any instances in which the elimination was done by Punk or Orton?
#
### SQL:
#
# SELECT TIME FROM elimination WHERE Eliminated_By = "Punk" OR Eliminated_By = "Orton"
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# How many schools are there?
#
### SQL:
#
# SELECT count(*) FROM school
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# Count the number of schools.
#
### SQL:
#
# SELECT count(*) FROM school
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# Show all school names in alphabetical order.
#
### SQL:
#
# SELECT school_name FROM school ORDER BY school_name
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# List the name, location, mascot for all schools.
#
### SQL:
#
# SELECT school_name , LOCATION , mascot FROM school
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# What are the total and average enrollment of all schools?
#
### SQL:
#
# SELECT sum(enrollment) , avg(enrollment) FROM school
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# What are the mascots for schools with enrollments above the average?
#
### SQL:
#
# SELECT mascot FROM school WHERE enrollment > (SELECT avg(enrollment) FROM school)
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# List the name of the school with the smallest enrollment.
#
### SQL:
#
# SELECT school_name FROM school ORDER BY enrollment LIMIT 1
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# Show the average, maximum, minimum enrollment of all schools.
#
### SQL:
#
# SELECT avg(enrollment) , max(enrollment) , min(enrollment) FROM school
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# Show each county along with the number of schools and total enrollment in each county.
#
### SQL:
#
# SELECT county , count(*) , sum(enrollment) FROM school GROUP BY county
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# How many donors have endowment for school named "Glenn"?
#
### SQL:
#
# 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"
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# List each donator name and the amount of endowment in descending order of the amount of endowment.
#
### SQL:
#
# SELECT donator_name , sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# List the names of the schools without any endowment.
#
### SQL:
#
# SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment)
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# List all the names of schools with an endowment amount smaller than or equal to 10.
#
### SQL:
#
# 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
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# Show the names of donors who donated to both school "Glenn" and "Triton."
#
### SQL:
#
# 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'
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# Show the names of all the donors except those whose donation amount less than 9.
#
### SQL:
#
# SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9
#
### End.
|
school_finance
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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, School_id, donator_name, amount )
#
# budget.School_id can be joined with School.School_id
# endowment.School_id can be joined with School.School_id
#
### Question:
#
# List the amount and donor name for the largest amount of donation.
#
### SQL:
#
# SELECT amount , donator_name FROM endowment ORDER BY amount DESC LIMIT 1
#
### End.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.