db_id
stringlengths 4
31
| text
stringlengths 398
4.9k
|
---|---|
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ + _ from _ where _ > ( select avg ( _ ) from _ ) | select accounts.name , checking.balance + savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from savings ) |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ + _ from _ where _ > ( select avg ( _ ) from _ ) | select accounts.name , checking.balance + savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from savings ) |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name and checking balance of the account with the lowest savings balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ asc limit _ | select accounts.name , checking.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by savings.balance asc limit 1 |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names and balances of checking accounts belonging to the customer with the lowest savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ asc limit _ | select accounts.name , checking.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by savings.balance asc limit 1 |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the number of checking accounts for each account name. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select count ( _ ) , _ from _ group by _ | select count ( * ) , accounts.name from accounts join checking on accounts.custid = checking.custid group by accounts.name |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of customers with accounts, and how many checking accounts do each of them have? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select count ( _ ) , _ from _ group by _ | select count ( * ) , accounts.name from accounts join checking on accounts.custid = checking.custid group by accounts.name |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the total saving balance for each account name. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select sum ( _ ) , _ from _ group by _ | select sum ( savings.balance ) , accounts.name from accounts join savings on accounts.custid = savings.custid group by accounts.name |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of customers with accounts, and what are the total savings balances for each? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select sum ( _ ) , _ from _ group by _ | select sum ( savings.balance ) , accounts.name from accounts join savings on accounts.custid = savings.custid group by accounts.name |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name of accounts whose checking balance is below the average checking balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ < ( select avg ( _ ) from _ ) | select accounts.name from accounts join checking on accounts.custid = checking.custid where checking.balance < ( select avg ( balance ) from checking ) |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of customers with checking balances lower than the average checking balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ < ( select avg ( _ ) from _ ) | select accounts.name from accounts join checking on accounts.custid = checking.custid where checking.balance < ( select avg ( balance ) from checking ) |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the saving balance of the account with the highest checking balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ desc limit _ | select savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance desc limit 1 |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the savings balance of the account belonging to the customer with the highest checking balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ desc limit _ | select savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance desc limit 1 |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the total checking and saving balance of all accounts sorted by the total balance in ascending order. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ + _ from _ order by _ + _ asc | select checking.balance + savings.balance from checking join savings on checking.custid = savings.custid order by checking.balance + savings.balance asc |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the sum of checking and savings balances for all customers, ordered by the total balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ + _ from _ order by _ + _ asc | select checking.balance + savings.balance from checking join savings on checking.custid = savings.custid order by checking.balance + savings.balance asc |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name and checking balance of the account with the lowest saving balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ asc limit _ | select checking.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by savings.balance asc limit 1 |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the name and checking balance of the account which has the lowest savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ asc limit _ | select checking.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by savings.balance asc limit 1 |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name, checking balance and saving balance of all accounts in the bank. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ | select checking.balance , savings.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names, checking balances, and savings balances for all customers? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ | select checking.balance , savings.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: 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. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ + _ desc | select checking.balance , savings.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance + savings.balance desc |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ + _ desc | select checking.balance , savings.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance + savings.balance desc |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name of accounts whose checking balance is higher than corresponding saving balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ | select accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where checking.balance > savings.balance |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of customers with a higher checking balance than savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ where _ | select accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where checking.balance > savings.balance |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ + _ from _ where _ | select accounts.name , savings.balance + checking.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where savings.balance < checking.balance |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: 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? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ + _ from _ where _ | select accounts.name , savings.balance + checking.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where savings.balance < checking.balance |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ desc limit _ | select accounts.name , savings.balance from accounts join savings on accounts.custid = savings.custid order by savings.balance desc limit 3 |
small_bank_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are names and savings balances of the three accounts with the highest savings balances? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid |
### Response:
select _ from _ order by _ desc limit _ | select accounts.name , savings.balance from accounts join savings on accounts.custid = savings.custid order by savings.balance desc limit 3 |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many main stream browsers whose market share is at least 5 exist? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select count ( _ ) from _ where _ | select count ( * ) from browser where market_share >= 5 |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the name of browsers in descending order by market share. | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ order by _ desc | select name from browser order by market_share desc |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the ids, names and market shares of all browsers. | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ | select id , name , market_share from browser |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the maximum, minimum and average market share of the listed browsers? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( market_share ) , min ( market_share ) , avg ( market_share ) from browser |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the id and market share of the browser Safari? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ where _ | select id , market_share from browser where name = 'Safari' |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ where _ | select name , operating_system from web_client_accelerator where connection != 'Broadband' |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ where _ | select browser.name from browser join accelerator_compatible_browser on browser.id = accelerator_compatible_browser.browser_id join web_client_accelerator on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id where web_client_accelerator.name = 'CProxy' and accelerator_compatible_browser.compatible_since_year > 1998 |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the ids and names of the web accelerators that are compatible with two or more browsers? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ group by _ having count ( _ ) >= _ | select web_client_accelerator.id , web_client_accelerator.name from web_client_accelerator join accelerator_compatible_browser on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id group by web_client_accelerator.id having count ( * ) >= 2 |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the id and name of the browser that is compatible with the most web accelerators? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select browser.id , browser.name from browser join accelerator_compatible_browser on browser.id = accelerator_compatible_browser.browser_id group by browser.id order by count ( * ) desc limit 1 |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ where _ | select accelerator_compatible_browser.compatible_since_year from accelerator_compatible_browser join browser on accelerator_compatible_browser.browser_id = browser.id join web_client_accelerator on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id where web_client_accelerator.name = 'CACHEbox' and browser.name = 'Internet Explorer' |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many different kinds of clients are supported by the web clients accelerators? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select count ( distinct _ ) from _ | select count ( distinct client ) from web_client_accelerator |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many accelerators are not compatible with the browsers listed ? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from web_client_accelerator where id not in ( select accelerator_id from accelerator_compatible_browser ) |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What distinct accelerator names are compatible with the browswers that have market share higher than 15? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select distinct _ from _ where _ | select distinct web_client_accelerator.name from web_client_accelerator join accelerator_compatible_browser on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id join browser on accelerator_compatible_browser.browser_id = browser.id where browser.market_share > 15 |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'. | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select browser.name from web_client_accelerator join accelerator_compatible_browser on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id join browser on accelerator_compatible_browser.browser_id = browser.id where web_client_accelerator.name = 'CACHEbox' intersect select browser.name from web_client_accelerator join accelerator_compatible_browser on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id join browser on accelerator_compatible_browser.browser_id = browser.id where web_client_accelerator.name = 'Fasterfox' |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'. | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ except select _ from _ where _ | select name , operating_system from web_client_accelerator except select web_client_accelerator.name , web_client_accelerator.operating_system from web_client_accelerator join accelerator_compatible_browser on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id join browser on accelerator_compatible_browser.browser_id = browser.id where browser.name = 'Opera' |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which accelerator name contains substring "Opera"? | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ where _ like _ | select name from web_client_accelerator where name like '%Opera%' |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the number of web accelerators used for each Operating system. | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ , count ( _ ) from _ group by _ | select operating_system , count ( * ) from web_client_accelerator group by operating_system |
browser_web | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: give me names of all compatible browsers and accelerators in the descending order of compatible year | 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 = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id |
### Response:
select _ from _ order by _ desc | select browser.name , web_client_accelerator.name from accelerator_compatible_browser join browser on accelerator_compatible_browser.browser_id = browser.id join web_client_accelerator on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id order by accelerator_compatible_browser.compatible_since_year desc |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many wrestlers are there? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select count ( _ ) from _ | select count ( * ) from wrestler |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Count the number of wrestlers. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select count ( _ ) from _ | select count ( * ) from wrestler |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the names of wrestlers in descending order of days held. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ order by _ desc | select name from wrestler order by days_held desc |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of the wrestlers, ordered descending by days held? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ order by _ desc | select name from wrestler order by days_held desc |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the name of the wrestler with the fewest days held? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ order by _ asc limit _ | select name from wrestler order by days_held asc limit 1 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Return the name of the wrestler who had the lowest number of days held. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ order by _ asc limit _ | select name from wrestler order by days_held asc limit 1 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the distinct reigns of wrestlers whose location is not "Tokyo,Japan" ? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select distinct _ from _ where _ | select distinct reign from wrestler where location != 'Tokyo , Japan' |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Give the different reigns of wrestlers who are not located in Tokyo, Japan. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select distinct _ from _ where _ | select distinct reign from wrestler where location != 'Tokyo , Japan' |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names and location of the wrestlers? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ | select name , location from wrestler |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Give the names and locations of all wrestlers. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ | select name , location from wrestler |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the elimination moves of wrestlers whose team is "Team Orton"? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ | select elimination_move from elimination where team = 'Team Orton' |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Return the elimination movies of wrestlers on Team Orton. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ | select elimination_move from elimination where team = 'Team Orton' |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of wrestlers and the elimination moves? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ | select wrestler.name , elimination.elimination_move from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Give the names of wrestlers and their elimination moves. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ | select wrestler.name , elimination.elimination_move from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the names of wrestlers and the teams in elimination in descending order of days held. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ order by _ desc | select wrestler.name , elimination.team from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id order by wrestler.days_held desc |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of wrestlers and their teams in elimination, ordered descending by days held? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ order by _ desc | select wrestler.name , elimination.team from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id order by wrestler.days_held desc |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the time of elimination of the wrestlers with largest days held. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ order by _ desc limit _ | select elimination.time from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id order by wrestler.days_held desc limit 1 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the time of elimination for the wrestler with the most days held? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ order by _ desc limit _ | select elimination.time from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id order by wrestler.days_held desc limit 1 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show times of elimination of wrestlers with days held more than 50. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ | select elimination.time from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id where wrestler.days_held > 50 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the times of elimination for wrestlers with over 50 days held? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ | select elimination.time from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id where wrestler.days_held > 50 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show different teams in eliminations and the number of eliminations from each team. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ , count ( _ ) from _ group by _ | select team , count ( * ) from elimination group by team |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many eliminations did each team have? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ , count ( _ ) from _ group by _ | select team , count ( * ) from elimination group by team |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show teams that have suffered more than three eliminations. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ group by _ having count ( _ ) > _ | select team from elimination group by team having count ( * ) > 3 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which teams had more than 3 eliminations? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ group by _ having count ( _ ) > _ | select team from elimination group by team having count ( * ) > 3 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show the reign and days held of wrestlers. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ | select reign , days_held from wrestler |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the reigns and days held of all wrestlers? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ | select reign , days_held from wrestler |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of wrestlers days held less than 100? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ | select name from wrestler where days_held < 100 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Return the names of wrestlers with fewer than 100 days held. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ | select name from wrestler where days_held < 100 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Please show the most common reigns of wrestlers. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select reign from wrestler group by reign order by count ( * ) desc limit 1 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which reign is the most common among wrestlers? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select reign from wrestler group by reign order by count ( * ) desc limit 1 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the locations that are shared by more than two wrestlers. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ group by _ having count ( _ ) > _ | select location from wrestler group by location having count ( * ) > 2 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which locations are shared by more than two wrestlers? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ group by _ having count ( _ ) > _ | select location from wrestler group by location having count ( * ) > 2 |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the names of wrestlers that have not been eliminated. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select name from wrestler where wrestler_id not in ( select wrestler_id from elimination ) |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of wrestlers who have never been eliminated? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select name from wrestler where wrestler_id not in ( select wrestler_id from elimination ) |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin". | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select team from elimination where eliminated_by = 'Orton' intersect select team from elimination where eliminated_by = 'Benjamin' |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select team from elimination where eliminated_by = 'Orton' intersect select team from elimination where eliminated_by = 'Benjamin' |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the number of distinct teams that suffer elimination? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select count ( distinct _ ) from _ | select count ( distinct team ) from elimination |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many different teams have had eliminated wrestlers? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select count ( distinct _ ) from _ | select count ( distinct team ) from elimination |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show the times of elimination by "Punk" or "Orton". | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ | select time from elimination where eliminated_by = 'Punk' or eliminated_by = 'Orton' |
wrestler | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the times of elimination for any instances in which the elimination was done by Punk or Orton? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id |
### Response:
select _ from _ where _ | select time from elimination where eliminated_by = 'Punk' or eliminated_by = 'Orton' |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many schools are there? | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select count ( _ ) from _ | select count ( * ) from school |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Count the number of schools. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select count ( _ ) from _ | select count ( * ) from school |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show all school names in alphabetical order. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ from _ order by _ asc | select school_name from school order by school_name asc |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the name, location, mascot for all schools. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ from _ | select school_name , location , mascot from school |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the total and average enrollment of all schools? | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select sum ( _ ) , avg ( _ ) from _ | select sum ( enrollment ) , avg ( enrollment ) from school |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the mascots for schools with enrollments above the average? | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ from _ where _ > ( select avg ( _ ) from _ ) | select mascot from school where enrollment > ( select avg ( enrollment ) from school ) |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the name of the school with the smallest enrollment. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ from _ order by _ asc limit _ | select school_name from school order by enrollment asc limit 1 |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show the average, maximum, minimum enrollment of all schools. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select avg ( _ ) , max ( _ ) , min ( _ ) from _ | select avg ( enrollment ) , max ( enrollment ) , min ( enrollment ) from school |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show each county along with the number of schools and total enrollment in each county. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ , count ( _ ) , sum ( _ ) from _ group by _ | select county , count ( * ) , sum ( enrollment ) from school group by county |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many donors have endowment for school named "Glenn"? | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select count ( distinct _ ) from _ where _ | select count ( distinct endowment.donator_name ) from endowment join school on endowment.school_id = school.school_id where school.school_name = 'Glenn' |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List each donator name and the amount of endowment in descending order of the amount of endowment. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ , sum ( _ ) from _ group by _ order by sum ( _ ) desc | select donator_name , sum ( amount ) from endowment group by donator_name order by sum ( amount ) desc |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the names of the schools without any endowment. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select school_name from school where school_id not in ( select school_id from endowment ) |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List all the names of schools with an endowment amount smaller than or equal to 10. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ from _ group by _ having sum ( _ ) <= _ | select school.school_name from endowment join school on endowment.school_id = school.school_id group by endowment.school_id having sum ( endowment.amount ) <= 10 |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show the names of donors who donated to both school "Glenn" and "Triton." | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select endowment.donator_name from endowment join school on endowment.school_id = school.school_id where school.school_name = 'Glenn' intersect select endowment.donator_name from endowment join school on endowment.school_id = school.school_id where school.school_name = 'Triton' |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Show the names of all the donors except those whose donation amount less than 9. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ from _ except select _ from _ where _ | select donator_name from endowment except select donator_name from endowment where amount < 9 |
school_finance | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: List the amount and donor name for the largest amount of donation. | 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 = school.school_id | endowment.school_id = school.school_id |
### Response:
select _ from _ order by _ desc limit _ | select amount , donator_name from endowment order by amount desc limit 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.