db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
company_employee | select max(market_value_in_billion) , min(market_value_in_billion) from company | Question: what is the maximum and minimum market value of companies? | Tables: 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... | what is the maximum and minimum market value of companies? |
company_employee | select headquarters from company order by sales_in_billion desc limit 1 | Question: what is the headquarter of the company with the largest sales? | Tables: 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, ... | what is the headquarter of the company with the largest sales? |
company_employee | select headquarters , count(*) from company group by headquarters | Question: show the different headquarters and number of companies at each headquarter. | Tables: 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_I... | show the different headquarters and number of companies at each headquarter. |
company_employee | select headquarters from company group by headquarters order by count(*) desc limit 1 | Question: show the most common headquarter for companies. | Tables: 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. |... | show the most common headquarter for companies. |
company_employee | select headquarters from company group by headquarters having count(*) >= 2 | Question: show the headquarters that have at least two companies. | Tables: 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_wo... | show the headquarters that have at least two companies. |
company_employee | select headquarters from company where industry = 'banking' intersect select headquarters from company where industry = 'oil and gas' | Question: show the headquarters that have both companies in banking industry and companies in oil and gas industry. | Tables: 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_Bil... | show the headquarters that have both companies in banking industry and companies in oil and gas industry. |
company_employee | select t3.name , t2.name from employment as t1 join people as t2 on t1.people_id = t2.people_id join company as t3 on t1.company_id = t3.company_id | Question: show the names of companies and of employees. | Tables: 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. | J... | show the names of companies and of employees. |
company_employee | select t3.name , t2.name from employment as t1 join people as t2 on t1.people_id = t2.people_id join company as t3 on t1.company_id = t3.company_id order by t1.year_working | Question: show names of companies and that of employees in descending order of number of years working for that employee. | Tables: 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_... | show names of companies and that of employees in descending order of number of years working for that employee. |
company_employee | select t2.name from employment as t1 join people as t2 on t1.people_id = t2.people_id join company as t3 on t1.company_id = t3.company_id where t3.sales_in_billion > 200 | Question: show the names of employees that work for companies with sales bigger than 200. | Tables: 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 -> Compan... | show the names of employees that work for companies with sales bigger than 200. |
company_employee | select t3.name , count(*) from employment as t1 join people as t2 on t1.people_id = t2.people_id join company as t3 on t1.company_id = t3.company_id group by t3.name | Question: show the names of companies and the number of employees they have | Tables: 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_I... | show the names of companies and the number of employees they have |
company_employee | select name from people where people_id not in (select people_id from employment) | Question: list the names of people that are not employed by any company | Tables: 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, Y... | list the names of people that are not employed by any company |
company_employee | select name from company where sales_in_billion > 200 order by sales_in_billion , profits_in_billion desc | Question: list the names of the companies with more than 200 sales in the descending order of sales and profits. | Tables: 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_Billio... | list the names of the companies with more than 200 sales in the descending order of sales and profits. |
film_rank | select count(*) from film | Question: how many film are there? | Tables: 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. | Joins: film_market_estimation.Market_ID = market.Market_ID, film_ma... | how many film are there? |
film_rank | select count(*) from film | Question: count the number of films. | Tables: 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. | Joins: film_market_estimation.Market_ID = market.Market_ID, film_... | count the number of films. |
film_rank | select distinct director from film | Question: list the distinct director of all films. | Tables: 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. | Joins: film_market_estimation.Market_ID = market.Ma... | list the distinct director of all films. |
film_rank | select distinct director from film | Question: what are the different film directors? | Tables: 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. | Joins: film_market_estimation.Market_ID = market.Mark... | what are the different film directors? |
film_rank | select avg(gross_in_dollar) from film | Question: what is the average ticket sales gross in dollars of films? | Tables: 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. | Joins: film_market_estimation.Ma... | what is the average ticket sales gross in dollars of films? |
film_rank | select avg(gross_in_dollar) from film | Question: return the average gross sales in dollars across all films. | Tables: 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. | Joins: film_market_estimation.Ma... | return the average gross sales in dollars across all films. |
film_rank | select low_estimate , high_estimate from film_market_estimation | Question: what are the low and high estimates of film markets? | Tables: 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. | Joins: film_market_estimation.Market_ID... | what are the low and high estimates of film markets? |
film_rank | select low_estimate , high_estimate from film_market_estimation | Question: return the low and high estimates for all film markets. | Tables: 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. | Joins: film_market_estimation.Market... | return the low and high estimates for all film markets. |
film_rank | select type from film_market_estimation where year = 1995 | Question: what are the types of film market estimations in year 1995? | Tables: 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. | Joins: film_market_estimation.Ma... | what are the types of film market estimations in year 1995? |
film_rank | select type from film_market_estimation where year = 1995 | Question: return the types of film market estimations in 1995. | Tables: 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. | Joins: film_market_estimation.Market_ID... | return the types of film market estimations in 1995. |
film_rank | select max(number_cities) , min(number_cities) from market | Question: what are the maximum and minimum number of cities in all markets. | Tables: 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. | Joins: film_market_estimat... | what are the maximum and minimum number of cities in all markets. |
film_rank | select max(number_cities) , min(number_cities) from market | Question: return the maximum and minimum number of cities across all markets. | Tables: 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. | Joins: film_market_estim... | return the maximum and minimum number of cities across all markets. |
film_rank | select count(*) from market where number_cities < 300 | Question: how many markets have number of cities smaller than 300? | Tables: 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. | Joins: film_market_estimation.Marke... | how many markets have number of cities smaller than 300? |
film_rank | select count(*) from market where number_cities < 300 | Question: count the number of markets that have a number of cities lower than 300. | Tables: 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. | Joins: film_market_... | count the number of markets that have a number of cities lower than 300. |
film_rank | select country from market order by country asc | Question: list all countries of markets in ascending alphabetical order. | Tables: 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. | Joins: film_market_estimation... | list all countries of markets in ascending alphabetical order. |
film_rank | select country from market order by country asc | Question: what are the countries for each market, ordered alphabetically? | Tables: 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. | Joins: film_market_estimatio... | what are the countries for each market, ordered alphabetically? |
film_rank | select country from market order by number_cities desc | Question: list all countries of markets in descending order of number of cities. | Tables: 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. | Joins: film_market_es... | list all countries of markets in descending order of number of cities. |
film_rank | select country from market order by number_cities desc | Question: what are the countries for each market ordered by decreasing number of cities? | Tables: 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. | Joins: film_m... | what are the countries for each market ordered by decreasing number of cities? |
film_rank | select t1.title , t2.type from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id | Question: please show the titles of films and the types of market estimations. | Tables: 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. | Joins: film_market_esti... | please show the titles of films and the types of market estimations. |
film_rank | select t1.title , t2.type from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id | Question: what are the titles of films and corresponding types of market estimations? | Tables: 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. | Joins: film_mark... | what are the titles of films and corresponding types of market estimations? |
film_rank | select distinct t1.director from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id where t2.year = 1995 | Question: show the distinct director of films with market estimation in the year of 1995. | Tables: 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. | Joins: film_... | show the distinct director of films with market estimation in the year of 1995. |
film_rank | select distinct t1.director from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id where t2.year = 1995 | Question: who are the different directors of films which had market estimation in 1995? | Tables: 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. | Joins: film_ma... | who are the different directors of films which had market estimation in 1995? |
film_rank | select avg(t2.number_cities) from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where t1.low_estimate > 10000 | Question: what is the average number of cities of markets with low film market estimate bigger than 10000? | Tables: 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, Yea... | what is the average number of cities of markets with low film market estimate bigger than 10000? |
film_rank | select avg(t2.number_cities) from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where t1.low_estimate > 10000 | Question: give the average number of cities within markets that had a low market estimation larger than 10000? | Tables: 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,... | give the average number of cities within markets that had a low market estimation larger than 10000? |
film_rank | select t2.country , t1.year from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id | Question: please list the countries and years of film market estimations. | Tables: 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. | Joins: film_market_estimatio... | please list the countries and years of film market estimations. |
film_rank | select t2.country , t1.year from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id | Question: what are the countries of markets and their corresponding years of market estimation? | Tables: 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. | Joins:... | what are the countries of markets and their corresponding years of market estimation? |
film_rank | select t1.year from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where t2.country = 'japan' order by t1.year desc | Question: please list the years of film market estimations when the market is in country 'japan' in descending order. | Tables: 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, Mar... | please list the years of film market estimations when the market is in country 'japan' in descending order. |
film_rank | select t1.year from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where t2.country = 'japan' order by t1.year desc | Question: what are the years of film market estimation for the market of japan, ordered by year descending? | Tables: 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, Ye... | what are the years of film market estimation for the market of japan, ordered by year descending? |
film_rank | select studio , count(*) from film group by studio | Question: list the studios of each film and the number of films produced by that studio. | Tables: 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. | Joins: film_m... | list the studios of each film and the number of films produced by that studio. |
film_rank | select studio , count(*) from film group by studio | Question: how films are produced by each studio? | Tables: 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. | Joins: film_market_estimation.Market_ID = market.Mark... | how films are produced by each studio? |
film_rank | select studio from film group by studio order by count(*) desc limit 1 | Question: list the name of film studio that have the most number of films. | Tables: 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. | Joins: film_market_estimati... | list the name of film studio that have the most number of films. |
film_rank | select studio from film group by studio order by count(*) desc limit 1 | Question: what is the name of teh studio that created the most films? | Tables: 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. | Joins: film_market_estimation.Ma... | what is the name of teh studio that created the most films? |
film_rank | select studio from film group by studio having count(*) >= 2 | Question: list the names of studios that have at least two films. | Tables: 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. | Joins: film_market_estimation.Market... | list the names of studios that have at least two films. |
film_rank | select studio from film group by studio having count(*) >= 2 | Question: what are the names of studios that have made two or more films? | Tables: 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. | Joins: film_market_estimatio... | what are the names of studios that have made two or more films? |
film_rank | select title from film where film_id not in (select film_id from film_market_estimation) | Question: list the title of films that do not have any market estimation. | Tables: 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. | Joins: film_market_estimatio... | list the title of films that do not have any market estimation. |
film_rank | select title from film where film_id not in (select film_id from film_market_estimation) | Question: what are the titles of films that do not have a film market estimation? | Tables: 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. | Joins: film_market_e... | what are the titles of films that do not have a film market estimation? |
film_rank | select studio from film where director = 'nicholas meyer' intersect select studio from film where director = 'walter hill' | Question: show the studios that have produced films with director 'nicholas meyer' and 'walter hill'. | Tables: 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. | ... | show the studios that have produced films with director 'nicholas meyer' and 'walter hill'. |
film_rank | select studio from film where director = 'nicholas meyer' intersect select studio from film where director = 'walter hill' | Question: what are the names of studios that have produced films with both nicholas meyer and walter hill? | Tables: 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, Yea... | what are the names of studios that have produced films with both nicholas meyer and walter hill? |
film_rank | select title , studio from film where studio like '%universal%' | Question: find the titles and studios of the films that are produced by some film studios that contained the word 'universal'. | Tables: 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, ... | find the titles and studios of the films that are produced by some film studios that contained the word 'universal'. |
film_rank | select title , studio from film where studio like '%universal%' | Question: what are the titles and studios of films that have been produced by a studio whose name contains 'universal'? | Tables: 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, M... | what are the titles and studios of films that have been produced by a studio whose name contains 'universal'? |
film_rank | select studio from film except select studio from film where director = 'walter hill' | Question: show the studios that have not produced films with director 'walter hill'. | Tables: 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. | Joins: film_marke... | show the studios that have not produced films with director 'walter hill'. |
film_rank | select studio from film except select studio from film where director = 'walter hill' | Question: which studios have never worked with the director walter hill? | Tables: 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. | Joins: film_market_estimation... | which studios have never worked with the director walter hill? |
film_rank | select studio from film group by studio having avg(gross_in_dollar) >= 4500000 | Question: list the studios which average gross is above 4500000. | Tables: 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. | Joins: film_market_estimation.Market_... | list the studios which average gross is above 4500000. |
film_rank | select studio from film group by studio having avg(gross_in_dollar) >= 4500000 | Question: which studios have an average gross of over 4500000? | Tables: 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. | Joins: film_market_estimation.Market_ID... | which studios have an average gross of over 4500000? |
film_rank | select t1.title from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id order by high_estimate desc limit 1 | Question: what is the title of the film that has the highest high market estimation. | Tables: 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. | Joins: film_marke... | what is the title of the film that has the highest high market estimation. |
film_rank | select t1.title from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id order by high_estimate desc limit 1 | Question: return the title of the film with the highest high estimate? | Tables: 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. | Joins: film_market_estimation.M... | return the title of the film with the highest high estimate? |
film_rank | select title , director from film where film_id not in (select film_id from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where country = 'china') | Question: what are the titles and directors of the films were never presented in china? | Tables: 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. | Joins: film_ma... | what are the titles and directors of the films were never presented in china? |
film_rank | select title , director from film where film_id not in (select film_id from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where country = 'china') | Question: return the titles and directors of films that were never in the market of china. | Tables: 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. | Joins: film... | return the titles and directors of films that were never in the market of china. |
cre_Doc_Tracking_DB | select count(*) from ref_calendar | Question: how many calendar items do we have? | Tables: 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 ... | how many calendar items do we have? |
cre_Doc_Tracking_DB | select count(*) from ref_calendar | Question: count the number of all the calendar items. | Tables: 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_Do... | count the number of all the calendar items. |
cre_Doc_Tracking_DB | select calendar_date , day_number from ref_calendar | Question: show all calendar dates and day numbers. | Tables: 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_Docum... | show all calendar dates and day numbers. |
cre_Doc_Tracking_DB | select calendar_date , day_number from ref_calendar | Question: what are all the calendar dates and day numbers? | Tables: 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. A... | what are all the calendar dates and day numbers? |
cre_Doc_Tracking_DB | select count(*) from ref_document_types | Question: show the number of document types. | Tables: 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 -... | show the number of document types. |
cre_Doc_Tracking_DB | select count(*) from ref_document_types | Question: how many document types are there? | Tables: 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 -... | how many document types are there? |
cre_Doc_Tracking_DB | select document_type_code , document_type_name from ref_document_types | Question: list all document type codes and document type names. | Tables: 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_Descripti... | list all document type codes and document type names. |
cre_Doc_Tracking_DB | select document_type_code , document_type_name from ref_document_types | Question: what are all the document type codes and document type names? | Tables: 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_D... | what are all the document type codes and document type names? |
cre_Doc_Tracking_DB | select document_type_name , document_type_description from ref_document_types where document_type_code = 'rv' | Question: what is the name and description for document type code rv? | Tables: 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_Des... | what is the name and description for document type code rv? |
cre_Doc_Tracking_DB | select document_type_name , document_type_description from ref_document_types where document_type_code = 'rv' | Question: give me the name and description of the document type code rv. | Tables: 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_... | give me the name and description of the document type code rv. |
cre_Doc_Tracking_DB | select document_type_code from ref_document_types where document_type_name = 'paper' | Question: what is the document type code for document type 'paper'? | Tables: 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_Descr... | what is the document type code for document type 'paper'? |
cre_Doc_Tracking_DB | select document_type_code from ref_document_types where document_type_name = 'paper' | Question: find the code of the document type 'paper'. | Tables: 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_Do... | find the code of the document type 'paper'. |
cre_Doc_Tracking_DB | select count(*) from all_documents where document_type_code = 'cv' or document_type_code = 'bk' | Question: show the number of documents with document type code cv or bk. | Tables: 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_... | show the number of documents with document type code cv or bk. |
cre_Doc_Tracking_DB | select count(*) from all_documents where document_type_code = 'cv' or document_type_code = 'bk' | Question: how many documents have document type code cv or bk? | Tables: 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_Descriptio... | how many documents have document type code cv or bk? |
cre_Doc_Tracking_DB | select date_stored from all_documents where document_name = 'marry cv' | Question: what is the date when the document 'marry cv' was stored? | Tables: 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_Descr... | what is the date when the document 'marry cv' was stored? |
cre_Doc_Tracking_DB | select date_stored from all_documents where document_name = 'marry cv' | Question: when was the document named 'marry cv' stored? give me the date. | Tables: 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, Rol... | when was the document named 'marry cv' stored? give me the date. |
cre_Doc_Tracking_DB | select t2.day_number , t1.date_stored from all_documents as t1 join ref_calendar as t2 on t1.date_stored = t2.calendar_date | Question: what is the day number and date of all the documents? | Tables: 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_Descripti... | what is the day number and date of all the documents? |
cre_Doc_Tracking_DB | select t2.day_number , t1.date_stored from all_documents as t1 join ref_calendar as t2 on t1.date_stored = t2.calendar_date | Question: return the day number and stored date for all the documents. | Tables: 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_De... | return the day number and stored date for all the documents. |
cre_Doc_Tracking_DB | select t2.document_type_name from all_documents as t1 join ref_document_types as t2 on t1.document_type_code = t2.document_type_code where t1.document_name = 'how to read a book' | Question: what is the document type name for the document with name 'how to read a book'? | Tables: 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,... | what is the document type name for the document with name 'how to read a book'? |
cre_Doc_Tracking_DB | select t2.document_type_name from all_documents as t1 join ref_document_types as t2 on t1.document_type_code = t2.document_type_code where t1.document_name = 'how to read a book' | Question: find the document type name of the document named 'how to read a book'. | Tables: 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_Na... | find the document type name of the document named 'how to read a book'. |
cre_Doc_Tracking_DB | select count(*) from ref_locations | Question: show the number of locations. | Tables: 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 -> Doc... | show the number of locations. |
cre_Doc_Tracking_DB | select count(*) from ref_locations | Question: how many locations are listed in the database? | Tables: 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... | how many locations are listed in the database? |
cre_Doc_Tracking_DB | select location_code , location_name from ref_locations | Question: list all location codes and location names. | Tables: 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_Do... | list all location codes and location names. |
cre_Doc_Tracking_DB | select location_code , location_name from ref_locations | Question: what are all the location codes and location names? | Tables: 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... | what are all the location codes and location names? |
cre_Doc_Tracking_DB | select location_name , location_description from ref_locations where location_code = 'x' | Question: what are the name and description for location code x? | Tables: 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_Descript... | what are the name and description for location code x? |
cre_Doc_Tracking_DB | select location_name , location_description from ref_locations where location_code = 'x' | Question: give me the name and description of the location with code x. | Tables: 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_D... | give me the name and description of the location with code x. |
cre_Doc_Tracking_DB | select location_code from ref_locations where location_name = 'canada' | Question: what is the location code for the country 'canada'? | Tables: 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... | what is the location code for the country 'canada'? |
cre_Doc_Tracking_DB | select location_code from ref_locations where location_name = 'canada' | Question: show the location code of the country 'canada'. | Tables: 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. Al... | show the location code of the country 'canada'. |
cre_Doc_Tracking_DB | select count(*) from roles | Question: how many roles are there? | Tables: 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 -> Documen... | how many roles are there? |
cre_Doc_Tracking_DB | select count(*) from roles | Question: count the total number of roles listed. | Tables: 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_Docume... | count the total number of roles listed. |
cre_Doc_Tracking_DB | select role_code , role_name , role_description from roles | Question: list all role codes, role names, and role descriptions. | Tables: 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_Descrip... | list all role codes, role names, and role descriptions. |
cre_Doc_Tracking_DB | select role_code , role_name , role_description from roles | Question: what are all the role codes, role names, and role descriptions? | Tables: 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... | what are all the role codes, role names, and role descriptions? |
cre_Doc_Tracking_DB | select role_name , role_description from roles where role_code = 'mg' | Question: what are the name and description for role code 'mg'? | Tables: 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_Descripti... | what are the name and description for role code 'mg'? |
cre_Doc_Tracking_DB | select role_name , role_description from roles where role_code = 'mg' | Question: find the name and description of the role with code 'mg'. | Tables: 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_Descr... | find the name and description of the role with code 'mg'. |
cre_Doc_Tracking_DB | select role_description from roles where role_name = 'proof reader' | Question: show the description for role name 'proof reader'. | Tables: 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.... | show the description for role name 'proof reader'. |
cre_Doc_Tracking_DB | select role_description from roles where role_name = 'proof reader' | Question: what is the description of the role named 'proof reader'? | Tables: 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_Descr... | what is the description of the role named 'proof reader'? |
cre_Doc_Tracking_DB | select count(*) from employees | Question: how many employees do we have? | Tables: 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 -> Do... | how many employees do we have? |
cre_Doc_Tracking_DB | select count(*) from employees | Question: find the number of employees we have. | Tables: 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_Document... | find the number of employees we have. |
cre_Doc_Tracking_DB | select employee_name , role_code , date_of_birth from employees where employee_name = 'armani' | Question: show the name, role code, and date of birth for the employee with name 'armani'. | Tables: 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... | show the name, role code, and date of birth for the employee with name 'armani'. |
cre_Doc_Tracking_DB | select employee_name , role_code , date_of_birth from employees where employee_name = 'armani' | Question: what are the name, role code, and date of birth of the employee named 'armani'? | Tables: 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,... | what are the name, role code, and date of birth of the employee named 'armani'? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.