output
stringlengths
18
577
instruction
stringlengths
16
224
input
stringclasses
160 values
SELECT max(Market_Value_in_Billion) , min(Market_Value_in_Billion) FROM company
What is the maximum and minimum market value of companies?
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1
What is the headquarter of the company with the largest sales?
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
SELECT Headquarters , COUNT(*) FROM company GROUP BY Headquarters
Show the different headquarters and number of companies at each headquarter.
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1
Show the most common headquarter for companies.
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2
Show the headquarters that have at least two companies.
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
SELECT Headquarters FROM company WHERE Industry = "Banking" INTERSECT SELECT Headquarters FROM company WHERE Industry = "Oil and gas"
Show the headquarters that have both companies in banking industry and companies in oil and gas industry.
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
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
Show the names of companies and of employees.
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
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
Show names of companies and that of employees in descending order of number of years working for that employee.
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
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
Show the names of employees that work for companies with sales bigger than 200.
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
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
Show the names of companies and the number of employees they have
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment)
List the names of people that are not employed by any company
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion , Profits_in_Billion DESC
list the names of the companies with more than 200 sales in the descending order of sales and profits.
"Schema (values (type))": people : People_ID (number) , Age (number) , Name (text) , Nationality (text) , Graduation_College (text) | company : Company_ID (number) , Name (text) , Headquarters (text) , Industry (text) , Sales_in_Billion (number) , Profits_in_Billion (number) , Assets_in_Billion (number) , Market_Value_in_Billion (number) | employment : Company_ID (number) , People_ID (number) , Year_working (number) "Primary Keys": people : People_ID | company : Company_ID | employment : Company_ID "Foreign Keys": employment : People_ID equals people : People_ID | employment : Company_ID equals company : Company_ID
SELECT count(*) FROM film
How many film are there?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT count(*) FROM film
Count the number of films.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT DISTINCT Director FROM film
List the distinct director of all films.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT DISTINCT Director FROM film
What are the different film Directors?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT avg(Gross_in_dollar) FROM film
What is the average ticket sales gross in dollars of films?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT avg(Gross_in_dollar) FROM film
Return the average gross sales in dollars across all films.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Low_Estimate , High_Estimate FROM film_market_estimation
What are the low and high estimates of film markets?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Low_Estimate , High_Estimate FROM film_market_estimation
Return the low and high estimates for all film markets.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995
What are the types of film market estimations in year 1995?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995
Return the types of film market estimations in 1995.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT max(Number_cities) , min(Number_cities) FROM market
What are the maximum and minimum number of cities in all markets.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT max(Number_cities) , min(Number_cities) FROM market
Return the maximum and minimum number of cities across all markets.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT count(*) FROM market WHERE Number_cities < 300
How many markets have number of cities smaller than 300?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT count(*) FROM market WHERE Number_cities < 300
Count the number of markets that have a number of cities lower than 300.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Country FROM market ORDER BY Country ASC
List all countries of markets in ascending alphabetical order.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Country FROM market ORDER BY Country ASC
What are the countries for each market, ordered alphabetically?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Country FROM market ORDER BY Number_cities DESC
List all countries of markets in descending order of number of cities.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Country FROM market ORDER BY Number_cities DESC
What are the countries for each market ordered by decreasing number of cities?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT T1.Title , T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID
Please show the titles of films and the types of market estimations.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT T1.Title , T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID
What are the titles of films and corresponding types of market estimations?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
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
Show the distinct director of films with market estimation in the year of 1995.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
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
Who are the different directors of films which had market estimation in 1995?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
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
What is the average number of cities of markets with low film market estimate bigger than 10000?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
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
Give the average number of cities within markets that had a low market estimation larger than 10000?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID
Please list the countries and years of film market estimations.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID
What are the countries of markets and their corresponding years of market estimation?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
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
Please list the years of film market estimations when the market is in country "Japan" in descending order.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
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
What are the years of film market estimation for the market of Japan, ordered by year descending?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio , COUNT(*) FROM film GROUP BY Studio
List the studios of each film and the number of films produced by that studio.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio , COUNT(*) FROM film GROUP BY Studio
How films are produced by each studio?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1
List the name of film studio that have the most number of films.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1
What is the name of teh studio that created the most films?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2
List the names of studios that have at least two films.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2
What are the names of studios that have made two or more films?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)
List the title of films that do not have any market estimation.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)
What are the titles of films that do not have a film market estimation?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill"
Show the studios that have produced films with director "Nicholas Meyer" and "Walter Hill".
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill"
What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT title , Studio FROM film WHERE Studio LIKE "%Universal%"
Find the titles and studios of the films that are produced by some film studios that contained the word "Universal".
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT title , Studio FROM film WHERE Studio LIKE "%Universal%"
What are the titles and studios of films that have been produced by a studio whose name contains "Universal"?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill"
Show the studios that have not produced films with director "Walter Hill".
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill"
Which studios have never worked with the director Walter Hill?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000
List the studios which average gross is above 4500000.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000
Which studios have an average gross of over 4500000?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
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
What is the title of the film that has the highest high market estimation.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
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
Return the title of the film with the highest high estimate?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
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')
What are the titles and directors of the films were never presented in China?
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
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')
Return the titles and directors of films that were never in the market of China.
"Schema (values (type))": film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (number) , Year (number) "Primary Keys": film : Film_ID | market : Market_ID | film_market_estimation : Estimation_ID "Foreign Keys": film_market_estimation : Market_ID equals market : Market_ID | film_market_estimation : Film_ID equals film : Film_ID
SELECT count(*) FROM Ref_calendar
How many calendar items do we have?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM Ref_calendar
Count the number of all the calendar items.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT calendar_date , day_Number FROM Ref_calendar
Show all calendar dates and day Numbers.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT calendar_date , day_Number FROM Ref_calendar
What are all the calendar dates and day Numbers?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM Ref_document_types
Show the number of document types.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM Ref_document_types
How many document types are there?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT document_type_code , document_type_name FROM Ref_document_types
List all document type codes and document type names.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT document_type_code , document_type_name FROM Ref_document_types
What are all the document type codes and document type names?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = "RV"
What is the name and description for document type code RV?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = "RV"
Give me the name and description of the document type code RV.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper"
What is the document type code for document type "Paper"?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper"
Find the code of the document type "Paper".
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM All_documents WHERE document_type_code = "CV" OR document_type_code = "BK"
Show the number of documents with document type code CV or BK.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM All_documents WHERE document_type_code = "CV" OR document_type_code = "BK"
How many documents have document type code CV or BK?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT date_stored FROM All_documents WHERE Document_name = "Marry CV"
What is the date when the document "Marry CV" was stored?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT date_stored FROM All_documents WHERE Document_name = "Marry CV"
When was the document named "Marry CV" stored? Give me the date.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date
What is the day Number and date of all the documents?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date
Return the day Number and stored date for all the documents.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
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"
What is the document type name for the document with name "How to read a book"?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
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"
Find the document type name of the document named "How to read a book".
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM Ref_locations
Show the number of locations.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM Ref_locations
How many locations are listed in the database?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT location_code , location_name FROM Ref_locations
List all location codes and location names.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT location_code , location_name FROM Ref_locations
What are all the location codes and location names?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT location_name , location_description FROM Ref_locations WHERE location_code = "x"
What are the name and description for location code x?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT location_name , location_description FROM Ref_locations WHERE location_code = "x"
Give me the name and description of the location with code x.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT location_code FROM Ref_locations WHERE location_name = "Canada"
What is the location code for the country "Canada"?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT location_code FROM Ref_locations WHERE location_name = "Canada"
Show the location code of the country "Canada".
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM ROLES
How many roles are there?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM ROLES
Count the total number of roles listed.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT role_code , role_name , role_description FROM ROLES
List all role codes, role names, and role descriptions.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT role_code , role_name , role_description FROM ROLES
What are all the role codes, role names, and role descriptions?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT role_name , role_description FROM ROLES WHERE role_code = "MG"
What are the name and description for role code "MG"?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT role_name , role_description FROM ROLES WHERE role_code = "MG"
Find the name and description of the role with code "MG".
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT role_description FROM ROLES WHERE role_name = "Proof Reader"
Show the description for role name "Proof Reader".
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT role_description FROM ROLES WHERE role_name = "Proof Reader"
What is the description of the role named "Proof Reader"?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM Employees
How many employees do we have?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT count(*) FROM Employees
Find the number of employees we have.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani'
Show the name, role code, and date of birth for the employee with name 'Armani'.
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID
SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani'
What are the name, role code, and date of birth of the employee named 'Armani'?
"Schema (values (type))": Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Description (text) | All_Documents : Document_ID (number) , Date_Stored (time) , Document_Type_Code (text) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Employees : Employee_ID (number) , Role_Code (text) , Employee_Name (text) , Gender_MFU (text) , Date_of_Birth (time) , Other_Details (text) | Document_Locations : Document_ID (number) , Location_Code (text) , Date_in_Location_From (time) , Date_in_Locaton_To (time) | Documents_to_be_Destroyed : Document_ID (number) , Destruction_Authorised_by_Employee_ID (number) , Destroyed_by_Employee_ID (number) , Planned_Destruction_Date (time) , Actual_Destruction_Date (time) , Other_Details (text) "Primary Keys": Ref_Document_Types : Document_Type_Code | Ref_Calendar : Calendar_Date | Ref_Locations : Location_Code | Roles : Role_Code | All_Documents : Document_ID | Employees : Employee_ID | Document_Locations : Document_ID | Documents_to_be_Destroyed : Document_ID "Foreign Keys": All_Documents : Date_Stored equals Ref_Calendar : Calendar_Date | All_Documents : Document_Type_Code equals Ref_Document_Types : Document_Type_Code | Employees : Role_Code equals Roles : Role_Code | Document_Locations : Document_ID equals All_Documents : Document_ID | Document_Locations : Date_in_Locaton_To equals Ref_Calendar : Calendar_Date | Document_Locations : Date_in_Location_From equals Ref_Calendar : Calendar_Date | Document_Locations : Location_Code equals Ref_Locations : Location_Code | Documents_to_be_Destroyed : Document_ID equals All_Documents : Document_ID | Documents_to_be_Destroyed : Actual_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Planned_Destruction_Date equals Ref_Calendar : Calendar_Date | Documents_to_be_Destroyed : Destruction_Authorised_by_Employee_ID equals Employees : Employee_ID | Documents_to_be_Destroyed : Destroyed_by_Employee_ID equals Employees : Employee_ID