db_id
stringlengths 4
31
| text
stringlengths 398
4.9k
|
---|---|
gas_company | 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 headquarters of all companies ordered by descending market value? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ order by _ desc | select company , headquarters from company order by market_value desc |
gas_company | 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 minimum, maximum, and average market value for all companies. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select min ( _ ) , max ( _ ) , avg ( _ ) from _ | select min ( market_value ) , max ( market_value ) , avg ( market_value ) from company |
gas_company | 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 minimum, maximum, and average market value for every company? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select min ( _ ) , max ( _ ) , avg ( _ ) from _ | select min ( market_value ) , max ( market_value ) , avg ( market_value ) from company |
gas_company | 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 main industry for all companies. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select distinct _ from _ | select distinct main_industry from company |
gas_company | 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 different main industries for all companies? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select distinct _ from _ | select distinct main_industry from company |
gas_company | 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 headquarters and the number of companies in each headquarter. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ , count ( _ ) from _ group by _ | select headquarters , count ( * ) from company group by headquarters |
gas_company | 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: For each headquarter, what are the headquarter and how many companies are centered there? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ , count ( _ ) from _ group by _ | select headquarters , count ( * ) from company group by headquarters |
gas_company | 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 main industry and total market value in each industry. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ , sum ( _ ) from _ group by _ | select main_industry , sum ( market_value ) from company group by main_industry |
gas_company | 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 main indstries and total market value for each industry? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ , sum ( _ ) from _ group by _ | select main_industry , sum ( market_value ) from company group by main_industry |
gas_company | 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 main industry with highest total market value and its number of companies. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ , count ( _ ) from _ group by _ order by sum ( _ ) desc limit _ | select main_industry , count ( * ) from company group by main_industry order by sum ( market_value ) desc limit 1 |
gas_company | 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: For each main industry, what is the total number of companies for the industry with the highest total market value? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ , count ( _ ) from _ group by _ order by sum ( _ ) desc limit _ | select main_industry , count ( * ) from company group by main_industry order by sum ( market_value ) desc limit 1 |
gas_company | 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 headquarters with at least two companies in the banking industry. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ group by _ having count ( _ ) >= _ | select headquarters from company where main_industry = 'Banking' group by headquarters having count ( * ) >= 2 |
gas_company | 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 headquarters with at least two companies in the banking industry? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ group by _ having count ( _ ) >= _ | select headquarters from company where main_industry = 'Banking' group by headquarters having count ( * ) >= 2 |
gas_company | 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 gas station id, location, and manager_name for all gas stations ordered by open year. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ order by _ asc | select station_id , location , manager_name from gas_station order by open_year asc |
gas_company | 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 gas station ids, locations, and manager names for the gas stations ordered by opening year? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ order by _ asc | select station_id , location , manager_name from gas_station order by open_year asc |
gas_company | 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 gas station are opened between 2000 and 2005? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select count ( _ ) from _ where _ between _ and _ | select count ( * ) from gas_station where open_year between 2000 and 2005 |
gas_company | 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 total number of gas stations that opened between 2000 and 2005? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select count ( _ ) from _ where _ between _ and _ | select count ( * ) from gas_station where open_year between 2000 and 2005 |
gas_company | 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 locations and the number of gas stations in each location ordered by the count. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select location , count ( * ) from gas_station group by location order by count ( * ) asc |
gas_company | 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: For each location, how many gas stations are there in order? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select location , count ( * ) from gas_station group by location order by count ( * ) asc |
gas_company | 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 headquarters with both a company in banking industry and a company in Oil and gas. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select headquarters from company where main_industry = 'Banking' intersect select headquarters from company where main_industry = 'Oil and gas' |
gas_company | 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 headquarters that have both a company in the banking and 'oil and gas' industries? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select headquarters from company where main_industry = 'Banking' intersect select headquarters from company where main_industry = 'Oil and gas' |
gas_company | 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 headquarters without a company in banking industry. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ except select _ from _ where _ | select headquarters from company except select headquarters from company where main_industry = 'Banking' |
gas_company | 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 headquarters without companies that are in the banking industry? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ except select _ from _ where _ | select headquarters from company except select headquarters from company where main_industry = 'Banking' |
gas_company | 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 company name with the number of gas station. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ , count ( _ ) from _ group by _ | select company.company , count ( * ) from station_company join company on station_company.company_id = company.company_id group by station_company.company_id |
gas_company | 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: For each company id, what are the companies and how many gas stations does each one operate? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ , count ( _ ) from _ group by _ | select company.company , count ( * ) from station_company join company on station_company.company_id = company.company_id group by station_company.company_id |
gas_company | 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 company name and main industry without a gas station. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select company , main_industry from company where company_id not in ( select company_id from station_company ) |
gas_company | 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 main industries of the companies without gas stations and what are the companies? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select company , main_industry from company where company_id not in ( select company_id from station_company ) |
gas_company | 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 manager name for gas stations belonging to the ExxonMobil company. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ | select gas_station.manager_name from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id where company.company = 'ExxonMobil' |
gas_company | 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 managers for gas stations that are operated by the ExxonMobil company? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ | select gas_station.manager_name from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id where company.company = 'ExxonMobil' |
gas_company | 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 locations where a gas station for company with market value greater than 100 is located. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ | select gas_station.location from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id where company.market_value > 100 |
gas_company | 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 locations that have gas stations owned by a company with a market value greater than 100? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ | select gas_station.location from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id where company.market_value > 100 |
gas_company | 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 manager name with most number of gas stations opened after 2000. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ group by _ order by count ( _ ) desc limit _ | select manager_name from gas_station where open_year > 2000 group by manager_name order by count ( * ) desc limit 1 |
gas_company | 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 manager with the most gas stations that opened after 2000? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ group by _ order by count ( _ ) desc limit _ | select manager_name from gas_station where open_year > 2000 group by manager_name order by count ( * ) desc limit 1 |
gas_company | 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: order all gas station locations by the opening year. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ order by _ asc | select location from gas_station order by open_year asc |
gas_company | 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 locations of all the gas stations ordered by opening year? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ order by _ asc | select location from gas_station order by open_year asc |
gas_company | 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 rank, company names, market values of the companies in the banking industry order by their sales and profits in billion. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ order by _ asc , _ | select rank , company , market_value from company where main_industry = 'Banking' order by sales_billion asc , profits_billion |
gas_company | 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 rank, company, and market value of every comapny in the banking industry ordered by sales and profits? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ where _ order by _ asc , _ | select rank , company , market_value from company where main_industry = 'Banking' order by sales_billion asc , profits_billion |
gas_company | 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 location and Representative name of the gas stations owned by the companies with top 3 Asset amounts. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ order by _ desc limit _ | select gas_station.location , gas_station.representative_name from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id order by company.assets_billion desc limit 3 |
gas_company | 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 locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id |
### Response:
select _ from _ order by _ desc limit _ | select gas_station.location , gas_station.representative_name from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id order by company.assets_billion desc limit 3 |
party_people | 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 regions do we have? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select count ( _ ) from _ | select count ( * ) from region |
party_people | 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 regions. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select count ( _ ) from _ | select count ( * ) from region |
party_people | 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 distinct region names ordered by their labels. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select distinct _ from _ order by _ asc | select distinct region_name from region order by label asc |
party_people | 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 different region names, ordered by labels? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select distinct _ from _ order by _ asc | select distinct region_name from region order by label asc |
party_people | 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 parties do we have? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select count ( distinct _ ) from _ | select count ( distinct party_name ) from party |
party_people | 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 different parties. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select count ( distinct _ ) from _ | select count ( distinct party_name ) from party |
party_people | 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 ministers and the time they took and left office, listed by the time they left office. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ order by _ asc | select minister , took_office , left_office from party order by left_office asc |
party_people | 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: Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ order by _ asc | select minister , took_office , left_office from party order by left_office asc |
party_people | 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 minister who took office after 1961 or before 1959. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ where _ | select minister from party where took_office > 1961 or took_office < 1959 |
party_people | 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: Who are the ministers who took office after 1961 or before 1959? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ where _ | select minister from party where took_office > 1961 or took_office < 1959 |
party_people | 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 ministers who do not belong to Progress Party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ where _ | select minister from party where party_name != 'Progress Party' |
party_people | 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 ministers are not a part of the Progress Party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ where _ | select minister from party where party_name != 'Progress Party' |
party_people | 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 ministers and parties they belong to in descending order of the time they took office. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ order by _ desc | select minister , party_name from party order by took_office desc |
party_people | 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: Who are the ministers and what parties do they belong to, listed descending by the times they took office? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ order by _ desc | select minister , party_name from party order by took_office desc |
party_people | 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 minister who left office at the latest time. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ order by _ desc limit _ | select minister from party order by left_office desc limit 1 |
party_people | 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 minister left office the latest? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ order by _ desc limit _ | select minister from party order by left_office desc limit 1 |
party_people | 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 member names and their party names. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ | select member.member_name , party.party_name from member join party on member.party_id = party.party_id |
party_people | 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 members and their corresponding parties? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ | select member.member_name , party.party_name from member join party on member.party_id = party.party_id |
party_people | 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 party names and the number of members in each party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ , count ( _ ) from _ group by _ | select party.party_name , count ( * ) from member join party on member.party_id = party.party_id group by member.party_id |
party_people | 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 members are in each party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ , count ( _ ) from _ group by _ | select party.party_name , count ( * ) from member join party on member.party_id = party.party_id group by member.party_id |
party_people | 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 party with most number of members? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select party.party_name from member join party on member.party_id = party.party_id group by member.party_id order by count ( * ) desc limit 1 |
party_people | 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 party with the most members. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select party.party_name from member join party on member.party_id = party.party_id group by member.party_id order by count ( * ) desc limit 1 |
party_people | 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 party names and their region names. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ | select party.party_name , region.region_name from party join region on party.region_id = region.region_id |
party_people | 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 parties and their respective regions? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ | select party.party_name , region.region_name from party join region on party.region_id = region.region_id |
party_people | 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 names of parties that does not have any members. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select party_name from party where party_id not in ( select party_id from member ) |
party_people | 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 parties that have no members? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select party_name from party where party_id not in ( select party_id from member ) |
party_people | 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 member names which are in both the party with id 3 and the party with id 1. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select member_name from member where party_id = 3 intersect select member_name from member where party_id = 1 |
party_people | 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 member names are shared among members in the party with the id 3 and the party with the id 1? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select member_name from member where party_id = 3 intersect select member_name from member where party_id = 1 |
party_people | 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 member names that are not in the Progress Party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ where _ | select member.member_name from member join party on member.party_id = party.party_id where party.party_name != 'Progress Party' |
party_people | 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 member names corresponding to members who are not in the Progress Party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ where _ | select member.member_name from member join party on member.party_id = party.party_id where party.party_name != 'Progress Party' |
party_people | 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 party events do we have? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select count ( _ ) from _ | select count ( * ) from party_events |
party_people | 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 party events. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select count ( _ ) from _ | select count ( * ) from party_events |
party_people | 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 party names and the number of events for each party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ , count ( _ ) from _ group by _ | select party.party_name , count ( * ) from party_events join party on party_events.party_id = party.party_id group by party_events.party_id |
party_people | 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 events are there for each party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ , count ( _ ) from _ group by _ | select party.party_name , count ( * ) from party_events join party on party_events.party_id = party.party_id group by party_events.party_id |
party_people | 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 member names who are not in charge of any event. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ except select _ from _ | select member_name from member except select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id |
party_people | 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 members who are not in charge of any events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ except select _ from _ | select member_name from member except select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id |
party_people | 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 parties with at least 2 events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ group by _ having count ( _ ) >= _ | select party.party_name from party_events join party on party_events.party_id = party.party_id group by party_events.party_id having count ( * ) >= 2 |
party_people | 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 parties that have two or more events. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ group by _ having count ( _ ) >= _ | select party.party_name from party_events join party on party_events.party_id = party.party_id group by party_events.party_id having count ( * ) >= 2 |
party_people | 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 member in charge of greatest number of events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id group by party_events.member_in_charge_id order by count ( * ) desc limit 1 |
party_people | 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 member who is in charge of the most events. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id group by party_events.member_in_charge_id order by count ( * ) desc limit 1 |
party_people | 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 event names that have more than 2 records. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ group by _ having count ( _ ) > _ | select event_name from party_events group by event_name having count ( * ) > 2 |
party_people | 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 event names were used more than twice for party events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select _ from _ group by _ having count ( _ ) > _ | select event_name from party_events group by event_name having count ( * ) > 2 |
party_people | 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 Annual Meeting events happened in the United Kingdom region? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select count ( _ ) from _ where _ | select count ( * ) from region join party on region.region_id = party.region_id join party_events on party.party_id = party_events.party_id where region.region_name = 'United Kingdom' and party_events.event_name = 'Annaual Meeting' |
party_people | 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 Annual Meeting events that took place in the region of the United Kingdom. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id |
### Response:
select count ( _ ) from _ where _ | select count ( * ) from region join party on region.region_id = party.region_id join party_events on party.party_id = party_events.party_id where region.region_name = 'United Kingdom' and party_events.event_name = 'Annaual Meeting' |
pilot_record | 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 pilots are there? | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select count ( _ ) from _ | select count ( * ) from pilot |
pilot_record | 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 pilots in ascending order of rank. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ from _ order by _ asc | select pilot_name from pilot order by rank asc |
pilot_record | 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 positions and teams of pilots? | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ from _ | select position , team from pilot |
pilot_record | 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 distinct positions of pilots older than 30. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select distinct _ from _ where _ | select distinct position from pilot where age > 30 |
pilot_record | 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 pilots from team "Bradley" or "Fordham". | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ from _ where _ | select pilot_name from pilot where team = 'Bradley' or team = 'Fordham' |
pilot_record | 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 joined year of the pilot of the highest rank? | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ from _ order by _ asc limit _ | select join_year from pilot order by rank asc limit 1 |
pilot_record | 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 different nationalities of pilots? Show each nationality and the number of pilots of each nationality. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ , count ( _ ) from _ group by _ | select nationality , count ( * ) from pilot group by nationality |
pilot_record | 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 most common nationality of pilots. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ from _ group by _ order by count ( _ ) desc limit _ | select nationality from pilot group by nationality order by count ( * ) desc limit 1 |
pilot_record | 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 pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ from _ where _ intersect select _ from _ where _ | select position from pilot where join_year < 2000 intersect select position from pilot where join_year > 2005 |
pilot_record | 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 pilots and models of aircrafts they have flied with. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ from _ | select pilot.pilot_name , aircraft.model from pilot_record join aircraft on pilot_record.aircraft_id = aircraft.aircraft_id join pilot on pilot_record.pilot_id = pilot.pilot_id |
pilot_record | 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 pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ from _ order by _ asc | select pilot.pilot_name , aircraft.fleet_series from pilot_record join aircraft on pilot_record.aircraft_id = aircraft.aircraft_id join pilot on pilot_record.pilot_id = pilot.pilot_id order by pilot.rank asc |
pilot_record | 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 fleet series of the aircrafts flied by pilots younger than 34 | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ from _ where _ | select aircraft.fleet_series from pilot_record join aircraft on pilot_record.aircraft_id = aircraft.aircraft_id join pilot on pilot_record.pilot_id = pilot.pilot_id where pilot.age < 34 |
pilot_record | 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 pilots and the number of records they have. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ , count ( _ ) from _ group by _ | select pilot.pilot_name , count ( * ) from pilot_record join pilot on pilot_record.pilot_id = pilot.pilot_id group by pilot.pilot_name |
pilot_record | 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 names of pilots that have more than one record. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select pilot.pilot_name , count ( * ) from pilot_record join pilot on pilot_record.pilot_id = pilot.pilot_id group by pilot.pilot_name having count ( * ) > 1 |
pilot_record | 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 pilots that do not have any record. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id |
### Response:
select _ from _ where _ not in ( select _ from _ ) | select pilot_name from pilot where pilot_id not in ( select pilot_id from pilot_record ) |
cre_Doc_Control_Systems | 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 document status codes do we have? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id |
### Response:
select _ from _ | select document_status_code from ref_document_status |
cre_Doc_Control_Systems | 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 description of document status code 'working'? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id |
### Response:
select _ from _ where _ | select document_status_description from ref_document_status where document_status_code = 'working' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.