db_id
stringlengths 4
31
| text
stringlengths 370
4.84k
|
---|---|
company_employee | 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 and minimum market value of companies? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select max ( market_value_in_billion ) , min ( market_value_in_billion ) from company |
company_employee | 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 headquarter of the company with the largest sales? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select headquarters from company order by sales_in_billion desc limit 1 |
company_employee | 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 different headquarters and number of companies at each headquarter. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select headquarters , count ( * ) from company group by headquarters |
company_employee | 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 headquarter for companies. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select headquarters from company group by headquarters order by count ( * ) desc limit 1 |
company_employee | 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 headquarters that have at least two companies. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select headquarters from company group by headquarters having count ( * ) >= 2 |
company_employee | 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 headquarters that have both companies in banking industry and companies in oil and gas industry. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select headquarters from company where industry = 'Banking' intersect select headquarters from company where industry = 'Oil and gas' |
company_employee | 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 companies and of employees. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select company.name , people.name from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id |
company_employee | 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 companies and that of employees in descending order of number of years working for that employee. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select company.name , people.name from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id order by employment.year_working asc |
company_employee | 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 employees that work for companies with sales bigger than 200. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select people.name from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id where company.sales_in_billion > 200 |
company_employee | 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 companies and the number of employees they have | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select company.name , count ( * ) from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id group by company.name |
company_employee | 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 people that are not employed by any company | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select name from people where people_id not in ( select people_id from employment ) |
company_employee | 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 companies with more than 200 sales in the descending order of sales and profits. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id |
### Response:
select name from company where sales_in_billion > 200 order by sales_in_billion , profits_in_billion desc |
film_rank | 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 film are there? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select count ( * ) from film |
film_rank | 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 films. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select count ( * ) from film |
film_rank | 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 director of all films. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select distinct director from film |
film_rank | 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 film Directors? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select distinct director from film |
film_rank | 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 average ticket sales gross in dollars of films? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select avg ( gross_in_dollar ) from film |
film_rank | 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 average gross sales in dollars across all films. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select avg ( gross_in_dollar ) from film |
film_rank | 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 low and high estimates of film markets? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select low_estimate , high_estimate from film_market_estimation |
film_rank | 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 low and high estimates for all film markets. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select low_estimate , high_estimate from film_market_estimation |
film_rank | 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 types of film market estimations in year 1995? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select type from film_market_estimation where year = 1995 |
film_rank | 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 types of film market estimations in 1995. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select type from film_market_estimation where year = 1995 |
film_rank | 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 maximum and minimum number of cities in all markets. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select max ( number_cities ) , min ( number_cities ) from market |
film_rank | 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 maximum and minimum number of cities across all markets. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select max ( number_cities ) , min ( number_cities ) from market |
film_rank | 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 markets have number of cities smaller than 300? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select count ( * ) from market where number_cities < 300 |
film_rank | 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 markets that have a number of cities lower than 300. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select count ( * ) from market where number_cities < 300 |
film_rank | 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 countries of markets in ascending alphabetical order. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select country from market order by country asc |
film_rank | 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 countries for each market, ordered alphabetically? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select country from market order by country asc |
film_rank | 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 countries of markets in descending order of number of cities. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select country from market order by number_cities desc |
film_rank | 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 countries for each market ordered by decreasing number of cities? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select country from market order by number_cities desc |
film_rank | 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 titles of films and the types of market estimations. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select film.title , film_market_estimation.type from film join film_market_estimation on film.film_id = film_market_estimation.film_id |
film_rank | 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 titles of films and corresponding types of market estimations? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select film.title , film_market_estimation.type from film join film_market_estimation on film.film_id = film_market_estimation.film_id |
film_rank | 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 distinct director of films with market estimation in the year of 1995. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select distinct film.director from film join film_market_estimation on film.film_id = film_market_estimation.film_id where film_market_estimation.year = 1995 |
film_rank | 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 different directors of films which had market estimation in 1995? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select distinct film.director from film join film_market_estimation on film.film_id = film_market_estimation.film_id where film_market_estimation.year = 1995 |
film_rank | 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 average number of cities of markets with low film market estimate bigger than 10000? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select avg ( market.number_cities ) from film_market_estimation join market on film_market_estimation.market_id = market.market_id where film_market_estimation.low_estimate > 10000 |
film_rank | 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 average number of cities within markets that had a low market estimation larger than 10000? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select avg ( market.number_cities ) from film_market_estimation join market on film_market_estimation.market_id = market.market_id where film_market_estimation.low_estimate > 10000 |
film_rank | 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 list the countries and years of film market estimations. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select market.country , film_market_estimation.year from film_market_estimation join market on film_market_estimation.market_id = market.market_id |
film_rank | 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 countries of markets and their corresponding years of market estimation? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select market.country , film_market_estimation.year from film_market_estimation join market on film_market_estimation.market_id = market.market_id |
film_rank | 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 list the years of film market estimations when the market is in country "Japan" in descending order. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select film_market_estimation.year from film_market_estimation join market on film_market_estimation.market_id = market.market_id where market.country = 'Japan' order by film_market_estimation.year desc |
film_rank | 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 years of film market estimation for the market of Japan, ordered by year descending? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select film_market_estimation.year from film_market_estimation join market on film_market_estimation.market_id = market.market_id where market.country = 'Japan' order by film_market_estimation.year desc |
film_rank | 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 studios of each film and the number of films produced by that studio. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio , count ( * ) from film group by studio |
film_rank | 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 films are produced by each studio? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio , count ( * ) from film group by studio |
film_rank | 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 film studio that have the most number of films. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio from film group by studio order by count ( * ) desc limit 1 |
film_rank | 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 teh studio that created the most films? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio from film group by studio order by count ( * ) desc limit 1 |
film_rank | 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 studios that have at least two films. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio from film group by studio having count ( * ) >= 2 |
film_rank | 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 studios that have made two or more films? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio from film group by studio having count ( * ) >= 2 |
film_rank | 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 title of films that do not have any market estimation. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select title from film where film_id not in ( select film_id from film_market_estimation ) |
film_rank | 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 titles of films that do not have a film market estimation? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select title from film where film_id not in ( select film_id from film_market_estimation ) |
film_rank | 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 studios that have produced films with director "Nicholas Meyer" and "Walter Hill". | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio from film where director = 'Nicholas Meyer' intersect select studio from film where director = 'Walter Hill' |
film_rank | 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 studios that have produced films with both Nicholas Meyer and Walter Hill? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio from film where director = 'Nicholas Meyer' intersect select studio from film where director = 'Walter Hill' |
film_rank | 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 titles and studios of the films that are produced by some film studios that contained the word "Universal". | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select title , studio from film where studio like '%Universal%' |
film_rank | 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 titles and studios of films that have been produced by a studio whose name contains "Universal"? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select title , studio from film where studio like '%Universal%' |
film_rank | 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 studios that have not produced films with director "Walter Hill". | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio from film except select studio from film where director = 'Walter Hill' |
film_rank | 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 studios have never worked with the director Walter Hill? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio from film except select studio from film where director = 'Walter Hill' |
film_rank | 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 studios which average gross is above 4500000. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio from film group by studio having avg ( gross_in_dollar ) >= 4500000 |
film_rank | 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 studios have an average gross of over 4500000? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select studio from film group by studio having avg ( gross_in_dollar ) >= 4500000 |
film_rank | 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 title of the film that has the highest high market estimation. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select film.title from film join film_market_estimation on film.film_id = film_market_estimation.film_id order by high_estimate desc limit 1 |
film_rank | 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 title of the film with the highest high estimate? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select film.title from film join film_market_estimation on film.film_id = film_market_estimation.film_id order by high_estimate desc limit 1 |
film_rank | 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 titles and directors of the films were never presented in China? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select title , director from film where film_id not in ( select film_id from film_market_estimation join market on film_market_estimation.market_id = market.market_id where country = 'China' ) |
film_rank | 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 titles and directors of films that were never in the market of China. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id |
### Response:
select title , director from film where film_id not in ( select film_id from film_market_estimation join market on film_market_estimation.market_id = market.market_id where country = 'China' ) |
cre_Doc_Tracking_DB | 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 calendar items do we have? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from ref_calendar |
cre_Doc_Tracking_DB | 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 all the calendar items. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from ref_calendar |
cre_Doc_Tracking_DB | 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 calendar dates and day Numbers. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select calendar_date , day_number from ref_calendar |
cre_Doc_Tracking_DB | 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 all the calendar dates and day Numbers? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select calendar_date , day_number from ref_calendar |
cre_Doc_Tracking_DB | 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 number of document types. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from ref_document_types |
cre_Doc_Tracking_DB | 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 document types are there? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from ref_document_types |
cre_Doc_Tracking_DB | 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 document type codes and document type names. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select document_type_code , document_type_name from ref_document_types |
cre_Doc_Tracking_DB | 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 all the document type codes and document type names? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select document_type_code , document_type_name from ref_document_types |
cre_Doc_Tracking_DB | 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 description for document type code RV? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select document_type_name , document_type_description from ref_document_types where document_type_code = 'RV' |
cre_Doc_Tracking_DB | 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 the name and description of the document type code RV. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select document_type_name , document_type_description from ref_document_types where document_type_code = 'RV' |
cre_Doc_Tracking_DB | 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 document type code for document type "Paper"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select document_type_code from ref_document_types where document_type_name = 'Paper' |
cre_Doc_Tracking_DB | 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 code of the document type "Paper". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select document_type_code from ref_document_types where document_type_name = 'Paper' |
cre_Doc_Tracking_DB | 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 number of documents with document type code CV or BK. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from all_documents where document_type_code = 'CV' or document_type_code = 'BK' |
cre_Doc_Tracking_DB | 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 documents have document type code CV or BK? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from all_documents where document_type_code = 'CV' or document_type_code = 'BK' |
cre_Doc_Tracking_DB | 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 date when the document "Marry CV" was stored? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select date_stored from all_documents where document_name = 'Marry CV' |
cre_Doc_Tracking_DB | 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 was the document named "Marry CV" stored? Give me the date. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select date_stored from all_documents where document_name = 'Marry CV' |
cre_Doc_Tracking_DB | 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 day Number and date of all the documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select ref_calendar.day_number , all_documents.date_stored from all_documents join ref_calendar on all_documents.date_stored = ref_calendar.calendar_date |
cre_Doc_Tracking_DB | 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 day Number and stored date for all the documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select ref_calendar.day_number , all_documents.date_stored from all_documents join ref_calendar on all_documents.date_stored = ref_calendar.calendar_date |
cre_Doc_Tracking_DB | 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 document type name for the document with name "How to read a book"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select ref_document_types.document_type_name from all_documents join ref_document_types on all_documents.document_type_code = ref_document_types.document_type_code where all_documents.document_name = 'How to read a book' |
cre_Doc_Tracking_DB | 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 document type name of the document named "How to read a book". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select ref_document_types.document_type_name from all_documents join ref_document_types on all_documents.document_type_code = ref_document_types.document_type_code where all_documents.document_name = 'How to read a book' |
cre_Doc_Tracking_DB | 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 number of locations. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from ref_locations |
cre_Doc_Tracking_DB | 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 locations are listed in the database? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from ref_locations |
cre_Doc_Tracking_DB | 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 location codes and location names. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select location_code , location_name from ref_locations |
cre_Doc_Tracking_DB | 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 all the location codes and location names? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select location_code , location_name from ref_locations |
cre_Doc_Tracking_DB | 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 description for location code x? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select location_name , location_description from ref_locations where location_code = 'x' |
cre_Doc_Tracking_DB | 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 the name and description of the location with code x. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select location_name , location_description from ref_locations where location_code = 'x' |
cre_Doc_Tracking_DB | 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 location code for the country "Canada"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select location_code from ref_locations where location_name = 'Canada' |
cre_Doc_Tracking_DB | 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 location code of the country "Canada". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select location_code from ref_locations where location_name = 'Canada' |
cre_Doc_Tracking_DB | 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 roles are there? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from roles |
cre_Doc_Tracking_DB | 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 total number of roles listed. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from roles |
cre_Doc_Tracking_DB | 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 role codes, role names, and role descriptions. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select role_code , role_name , role_description from roles |
cre_Doc_Tracking_DB | 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 all the role codes, role names, and role descriptions? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select role_code , role_name , role_description from roles |
cre_Doc_Tracking_DB | 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 description for role code "MG"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select role_name , role_description from roles where role_code = 'MG' |
cre_Doc_Tracking_DB | 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 description of the role with code "MG". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select role_name , role_description from roles where role_code = 'MG' |
cre_Doc_Tracking_DB | 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 description for role name "Proof Reader". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select role_description from roles where role_name = 'Proof Reader' |
cre_Doc_Tracking_DB | 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 the role named "Proof Reader"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select role_description from roles where role_name = 'Proof Reader' |
cre_Doc_Tracking_DB | 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 employees do we have? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from employees |
cre_Doc_Tracking_DB | 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 employees we have. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select count ( * ) from employees |
cre_Doc_Tracking_DB | 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 name, role code, and date of birth for the employee with name 'Armani'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select employee_name , role_code , date_of_birth from employees where employee_name = 'Armani' |
cre_Doc_Tracking_DB | 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, role code, and date of birth of the employee named 'Armani'? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id |
### Response:
select employee_name , role_code , date_of_birth from employees where employee_name = 'Armani' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.