db_id stringclasses 140 values | schema listlengths 0 26 | question stringlengths 16 224 | query stringlengths 18 577 | query_toks listlengths 4 90 | query_toks_no_value listlengths 4 125 | question_toks listlengths 4 44 |
|---|---|---|---|---|---|---|
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | What is the maximum and minimum market value of companies? | SELECT max(Market_Value_in_Billion) , min(Market_Value_in_Billion) FROM company | [
"SELECT",
"max",
"(",
"Market_Value_in_Billion",
")",
",",
"min",
"(",
"Market_Value_in_Billion",
")",
"FROM",
"company"
] | [
"select",
"max",
"(",
"market_value_in_billion",
")",
",",
"min",
"(",
"market_value_in_billion",
")",
"from",
"company"
] | [
"What",
"is",
"the",
"maximum",
"and",
"minimum",
"market",
"value",
"of",
"companies",
"?"
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | What is the headquarter of the company with the largest sales? | SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1 | [
"SELECT",
"Headquarters",
"FROM",
"company",
"ORDER",
"BY",
"Sales_in_Billion",
"DESC",
"LIMIT",
"1"
] | [
"select",
"headquarters",
"from",
"company",
"order",
"by",
"sales_in_billion",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"headquarter",
"of",
"the",
"company",
"with",
"the",
"largest",
"sales",
"?"
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | Show the different headquarters and number of companies at each headquarter. | SELECT Headquarters , COUNT(*) FROM company GROUP BY Headquarters | [
"SELECT",
"Headquarters",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"company",
"GROUP",
"BY",
"Headquarters"
] | [
"select",
"headquarters",
",",
"count",
"(",
"*",
")",
"from",
"company",
"group",
"by",
"headquarters"
] | [
"Show",
"the",
"different",
"headquarters",
"and",
"number",
"of",
"companies",
"at",
"each",
"headquarter",
"."
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | Show the most common headquarter for companies. | SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1 | [
"SELECT",
"Headquarters",
"FROM",
"company",
"GROUP",
"BY",
"Headquarters",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"headquarters",
"from",
"company",
"group",
"by",
"headquarters",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"Show",
"the",
"most",
"common",
"headquarter",
"for",
"companies",
"."
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | Show the headquarters that have at least two companies. | SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2 | [
"SELECT",
"Headquarters",
"FROM",
"company",
"GROUP",
"BY",
"Headquarters",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"headquarters",
"from",
"company",
"group",
"by",
"headquarters",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"Show",
"the",
"headquarters",
"that",
"have",
"at",
"least",
"two",
"companies",
"."
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | Show the headquarters that have both companies in banking industry and companies in oil and gas industry. | SELECT Headquarters FROM company WHERE Industry = "Banking" INTERSECT SELECT Headquarters FROM company WHERE Industry = "Oil and gas" | [
"SELECT",
"Headquarters",
"FROM",
"company",
"WHERE",
"Industry",
"=",
"``",
"Banking",
"''",
"INTERSECT",
"SELECT",
"Headquarters",
"FROM",
"company",
"WHERE",
"Industry",
"=",
"``",
"Oil",
"and",
"gas",
"''"
] | [
"select",
"headquarters",
"from",
"company",
"where",
"industry",
"=",
"value",
"intersect",
"select",
"headquarters",
"from",
"company",
"where",
"industry",
"=",
"value"
] | [
"Show",
"the",
"headquarters",
"that",
"have",
"both",
"companies",
"in",
"banking",
"industry",
"and",
"companies",
"in",
"oil",
"and",
"gas",
"industry",
"."
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | Show the names of companies and of employees. | 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 | [
"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"
] | [
"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",
"."
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | Show names of companies and that of employees in descending order of number of years working for that employee. | SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working | [
"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"
] | [
"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",
"."
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | Show the names of employees that work for companies with sales bigger than 200. | 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 | [
"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"
] | [
"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",
">",
"value"
] | [
"Show",
"the",
"names",
"of",
"employees",
"that",
"work",
"for",
"companies",
"with",
"sales",
"bigger",
"than",
"200",
"."
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | Show the names of companies and the number of employees they have | 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 | [
"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"
] | [
"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"
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | List the names of people that are not employed by any company | SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment) | [
"SELECT",
"Name",
"FROM",
"people",
"WHERE",
"People_ID",
"NOT",
"IN",
"(",
"SELECT",
"People_ID",
"FROM",
"employment",
")"
] | [
"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"
] |
company_employee | [
"CREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\" int,\n \"Name\" text,\n \"Nationality\" text,\n \"Graduation_College\" text,\n PRIMARY KEY (\"People_ID\")\n);",
"CREATE TABLE \"company\" (\n \"Company_ID\" real,\n \"Name\" text,\n \"Headquarters\" text,\n \"Industry\" text,\n \"Sales_in_Billion\" real,\n \"Profits_in_Billion\" real,\n \"Assets_in_Billion\" real,\n \"Market_Value_in_Billion\" real,\n PRIMARY KEY (\"Company_ID\")\n);",
"CREATE TABLE \"employment\" (\n \"Company_ID\" int,\n \"People_ID\" int,\n \"Year_working\" int,\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);"
] | list the names of the companies with more than 200 sales in the descending order of sales and profits. | SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion , Profits_in_Billion DESC | [
"SELECT",
"name",
"FROM",
"company",
"WHERE",
"Sales_in_Billion",
">",
"200",
"ORDER",
"BY",
"Sales_in_Billion",
",",
"Profits_in_Billion",
"DESC"
] | [
"select",
"name",
"from",
"company",
"where",
"sales_in_billion",
">",
"value",
"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",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | How many film are there? | SELECT count(*) FROM film | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"film"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"film"
] | [
"How",
"many",
"film",
"are",
"there",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Count the number of films. | SELECT count(*) FROM film | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"film"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"film"
] | [
"Count",
"the",
"number",
"of",
"films",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | List the distinct director of all films. | SELECT DISTINCT Director FROM film | [
"SELECT",
"DISTINCT",
"Director",
"FROM",
"film"
] | [
"select",
"distinct",
"director",
"from",
"film"
] | [
"List",
"the",
"distinct",
"director",
"of",
"all",
"films",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the different film Directors? | SELECT DISTINCT Director FROM film | [
"SELECT",
"DISTINCT",
"Director",
"FROM",
"film"
] | [
"select",
"distinct",
"director",
"from",
"film"
] | [
"What",
"are",
"the",
"different",
"film",
"Directors",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What is the average ticket sales gross in dollars of films? | SELECT avg(Gross_in_dollar) FROM film | [
"SELECT",
"avg",
"(",
"Gross_in_dollar",
")",
"FROM",
"film"
] | [
"select",
"avg",
"(",
"gross_in_dollar",
")",
"from",
"film"
] | [
"What",
"is",
"the",
"average",
"ticket",
"sales",
"gross",
"in",
"dollars",
"of",
"films",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Return the average gross sales in dollars across all films. | SELECT avg(Gross_in_dollar) FROM film | [
"SELECT",
"avg",
"(",
"Gross_in_dollar",
")",
"FROM",
"film"
] | [
"select",
"avg",
"(",
"gross_in_dollar",
")",
"from",
"film"
] | [
"Return",
"the",
"average",
"gross",
"sales",
"in",
"dollars",
"across",
"all",
"films",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the low and high estimates of film markets? | SELECT Low_Estimate , High_Estimate FROM film_market_estimation | [
"SELECT",
"Low_Estimate",
",",
"High_Estimate",
"FROM",
"film_market_estimation"
] | [
"select",
"low_estimate",
",",
"high_estimate",
"from",
"film_market_estimation"
] | [
"What",
"are",
"the",
"low",
"and",
"high",
"estimates",
"of",
"film",
"markets",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Return the low and high estimates for all film markets. | SELECT Low_Estimate , High_Estimate FROM film_market_estimation | [
"SELECT",
"Low_Estimate",
",",
"High_Estimate",
"FROM",
"film_market_estimation"
] | [
"select",
"low_estimate",
",",
"high_estimate",
"from",
"film_market_estimation"
] | [
"Return",
"the",
"low",
"and",
"high",
"estimates",
"for",
"all",
"film",
"markets",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the types of film market estimations in year 1995? | SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995 | [
"SELECT",
"TYPE",
"FROM",
"film_market_estimation",
"WHERE",
"YEAR",
"=",
"1995"
] | [
"select",
"type",
"from",
"film_market_estimation",
"where",
"year",
"=",
"value"
] | [
"What",
"are",
"the",
"types",
"of",
"film",
"market",
"estimations",
"in",
"year",
"1995",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Return the types of film market estimations in 1995. | SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995 | [
"SELECT",
"TYPE",
"FROM",
"film_market_estimation",
"WHERE",
"YEAR",
"=",
"1995"
] | [
"select",
"type",
"from",
"film_market_estimation",
"where",
"year",
"=",
"value"
] | [
"Return",
"the",
"types",
"of",
"film",
"market",
"estimations",
"in",
"1995",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the maximum and minimum number of cities in all markets. | SELECT max(Number_cities) , min(Number_cities) FROM market | [
"SELECT",
"max",
"(",
"Number_cities",
")",
",",
"min",
"(",
"Number_cities",
")",
"FROM",
"market"
] | [
"select",
"max",
"(",
"number_cities",
")",
",",
"min",
"(",
"number_cities",
")",
"from",
"market"
] | [
"What",
"are",
"the",
"maximum",
"and",
"minimum",
"number",
"of",
"cities",
"in",
"all",
"markets",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Return the maximum and minimum number of cities across all markets. | SELECT max(Number_cities) , min(Number_cities) FROM market | [
"SELECT",
"max",
"(",
"Number_cities",
")",
",",
"min",
"(",
"Number_cities",
")",
"FROM",
"market"
] | [
"select",
"max",
"(",
"number_cities",
")",
",",
"min",
"(",
"number_cities",
")",
"from",
"market"
] | [
"Return",
"the",
"maximum",
"and",
"minimum",
"number",
"of",
"cities",
"across",
"all",
"markets",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | How many markets have number of cities smaller than 300? | SELECT count(*) FROM market WHERE Number_cities < 300 | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"market",
"WHERE",
"Number_cities",
"<",
"300"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"market",
"where",
"number_cities",
"<",
"value"
] | [
"How",
"many",
"markets",
"have",
"number",
"of",
"cities",
"smaller",
"than",
"300",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Count the number of markets that have a number of cities lower than 300. | SELECT count(*) FROM market WHERE Number_cities < 300 | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"market",
"WHERE",
"Number_cities",
"<",
"300"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"market",
"where",
"number_cities",
"<",
"value"
] | [
"Count",
"the",
"number",
"of",
"markets",
"that",
"have",
"a",
"number",
"of",
"cities",
"lower",
"than",
"300",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | List all countries of markets in ascending alphabetical order. | SELECT Country FROM market ORDER BY Country ASC | [
"SELECT",
"Country",
"FROM",
"market",
"ORDER",
"BY",
"Country",
"ASC"
] | [
"select",
"country",
"from",
"market",
"order",
"by",
"country",
"asc"
] | [
"List",
"all",
"countries",
"of",
"markets",
"in",
"ascending",
"alphabetical",
"order",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the countries for each market, ordered alphabetically? | SELECT Country FROM market ORDER BY Country ASC | [
"SELECT",
"Country",
"FROM",
"market",
"ORDER",
"BY",
"Country",
"ASC"
] | [
"select",
"country",
"from",
"market",
"order",
"by",
"country",
"asc"
] | [
"What",
"are",
"the",
"countries",
"for",
"each",
"market",
",",
"ordered",
"alphabetically",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | List all countries of markets in descending order of number of cities. | SELECT Country FROM market ORDER BY Number_cities DESC | [
"SELECT",
"Country",
"FROM",
"market",
"ORDER",
"BY",
"Number_cities",
"DESC"
] | [
"select",
"country",
"from",
"market",
"order",
"by",
"number_cities",
"desc"
] | [
"List",
"all",
"countries",
"of",
"markets",
"in",
"descending",
"order",
"of",
"number",
"of",
"cities",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the countries for each market ordered by decreasing number of cities? | SELECT Country FROM market ORDER BY Number_cities DESC | [
"SELECT",
"Country",
"FROM",
"market",
"ORDER",
"BY",
"Number_cities",
"DESC"
] | [
"select",
"country",
"from",
"market",
"order",
"by",
"number_cities",
"desc"
] | [
"What",
"are",
"the",
"countries",
"for",
"each",
"market",
"ordered",
"by",
"decreasing",
"number",
"of",
"cities",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Please show the titles of films and the types of market estimations. | SELECT T1.Title , T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID | [
"SELECT",
"T1.Title",
",",
"T2.Type",
"FROM",
"film",
"AS",
"T1",
"JOIN",
"film_market_estimation",
"AS",
"T2",
"ON",
"T1.Film_ID",
"=",
"T2.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",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the titles of films and corresponding types of market estimations? | SELECT T1.Title , T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID | [
"SELECT",
"T1.Title",
",",
"T2.Type",
"FROM",
"film",
"AS",
"T1",
"JOIN",
"film_market_estimation",
"AS",
"T2",
"ON",
"T1.Film_ID",
"=",
"T2.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",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Show the distinct director of films with market estimation in the year of 1995. | 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 | [
"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"
] | [
"select",
"distinct",
"t1",
".",
"director",
"from",
"film",
"as",
"t1",
"join",
"film_market_estimation",
"as",
"t2",
"on",
"t1",
".",
"film_id",
"=",
"t2",
".",
"film_id",
"where",
"t2",
".",
"year",
"=",
"value"
] | [
"Show",
"the",
"distinct",
"director",
"of",
"films",
"with",
"market",
"estimation",
"in",
"the",
"year",
"of",
"1995",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Who are the different directors of films which had market estimation in 1995? | 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 | [
"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"
] | [
"select",
"distinct",
"t1",
".",
"director",
"from",
"film",
"as",
"t1",
"join",
"film_market_estimation",
"as",
"t2",
"on",
"t1",
".",
"film_id",
"=",
"t2",
".",
"film_id",
"where",
"t2",
".",
"year",
"=",
"value"
] | [
"Who",
"are",
"the",
"different",
"directors",
"of",
"films",
"which",
"had",
"market",
"estimation",
"in",
"1995",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What is the average number of cities of markets with low film market estimate bigger than 10000? | 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 | [
"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"
] | [
"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",
">",
"value"
] | [
"What",
"is",
"the",
"average",
"number",
"of",
"cities",
"of",
"markets",
"with",
"low",
"film",
"market",
"estimate",
"bigger",
"than",
"10000",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Give the average number of cities within markets that had a low market estimation larger than 10000? | 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 | [
"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"
] | [
"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",
">",
"value"
] | [
"Give",
"the",
"average",
"number",
"of",
"cities",
"within",
"markets",
"that",
"had",
"a",
"low",
"market",
"estimation",
"larger",
"than",
"10000",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Please list the countries and years of film market estimations. | SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID | [
"SELECT",
"T2.Country",
",",
"T1.Year",
"FROM",
"film_market_estimation",
"AS",
"T1",
"JOIN",
"market",
"AS",
"T2",
"ON",
"T1.Market_ID",
"=",
"T2.Market_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",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the countries of markets and their corresponding years of market estimation? | SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID | [
"SELECT",
"T2.Country",
",",
"T1.Year",
"FROM",
"film_market_estimation",
"AS",
"T1",
"JOIN",
"market",
"AS",
"T2",
"ON",
"T1.Market_ID",
"=",
"T2.Market_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",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Please list the years of film market estimations when the market is in country "Japan" in descending order. | 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 | [
"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"
] | [
"select",
"t1",
".",
"year",
"from",
"film_market_estimation",
"as",
"t1",
"join",
"market",
"as",
"t2",
"on",
"t1",
".",
"market_id",
"=",
"t2",
".",
"market_id",
"where",
"t2",
".",
"country",
"=",
"value",
"order",
"by",
"t1",
".",
"year",
"desc"
] | [
"Please",
"list",
"the",
"years",
"of",
"film",
"market",
"estimations",
"when",
"the",
"market",
"is",
"in",
"country",
"``",
"Japan",
"''",
"in",
"descending",
"order",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the years of film market estimation for the market of Japan, ordered by year descending? | 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 | [
"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"
] | [
"select",
"t1",
".",
"year",
"from",
"film_market_estimation",
"as",
"t1",
"join",
"market",
"as",
"t2",
"on",
"t1",
".",
"market_id",
"=",
"t2",
".",
"market_id",
"where",
"t2",
".",
"country",
"=",
"value",
"order",
"by",
"t1",
".",
"year",
"desc"
] | [
"What",
"are",
"the",
"years",
"of",
"film",
"market",
"estimation",
"for",
"the",
"market",
"of",
"Japan",
",",
"ordered",
"by",
"year",
"descending",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | List the studios of each film and the number of films produced by that studio. | SELECT Studio , COUNT(*) FROM film GROUP BY Studio | [
"SELECT",
"Studio",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"film",
"GROUP",
"BY",
"Studio"
] | [
"select",
"studio",
",",
"count",
"(",
"*",
")",
"from",
"film",
"group",
"by",
"studio"
] | [
"List",
"the",
"studios",
"of",
"each",
"film",
"and",
"the",
"number",
"of",
"films",
"produced",
"by",
"that",
"studio",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | How films are produced by each studio? | SELECT Studio , COUNT(*) FROM film GROUP BY Studio | [
"SELECT",
"Studio",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"film",
"GROUP",
"BY",
"Studio"
] | [
"select",
"studio",
",",
"count",
"(",
"*",
")",
"from",
"film",
"group",
"by",
"studio"
] | [
"How",
"films",
"are",
"produced",
"by",
"each",
"studio",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | List the name of film studio that have the most number of films. | SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1 | [
"SELECT",
"Studio",
"FROM",
"film",
"GROUP",
"BY",
"Studio",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"studio",
"from",
"film",
"group",
"by",
"studio",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"List",
"the",
"name",
"of",
"film",
"studio",
"that",
"have",
"the",
"most",
"number",
"of",
"films",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What is the name of teh studio that created the most films? | SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1 | [
"SELECT",
"Studio",
"FROM",
"film",
"GROUP",
"BY",
"Studio",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"studio",
"from",
"film",
"group",
"by",
"studio",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"name",
"of",
"teh",
"studio",
"that",
"created",
"the",
"most",
"films",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | List the names of studios that have at least two films. | SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2 | [
"SELECT",
"Studio",
"FROM",
"film",
"GROUP",
"BY",
"Studio",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"studio",
"from",
"film",
"group",
"by",
"studio",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"List",
"the",
"names",
"of",
"studios",
"that",
"have",
"at",
"least",
"two",
"films",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the names of studios that have made two or more films? | SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2 | [
"SELECT",
"Studio",
"FROM",
"film",
"GROUP",
"BY",
"Studio",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"studio",
"from",
"film",
"group",
"by",
"studio",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"What",
"are",
"the",
"names",
"of",
"studios",
"that",
"have",
"made",
"two",
"or",
"more",
"films",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | List the title of films that do not have any market estimation. | SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation) | [
"SELECT",
"Title",
"FROM",
"film",
"WHERE",
"Film_ID",
"NOT",
"IN",
"(",
"SELECT",
"Film_ID",
"FROM",
"film_market_estimation",
")"
] | [
"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",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the titles of films that do not have a film market estimation? | SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation) | [
"SELECT",
"Title",
"FROM",
"film",
"WHERE",
"Film_ID",
"NOT",
"IN",
"(",
"SELECT",
"Film_ID",
"FROM",
"film_market_estimation",
")"
] | [
"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",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Show the studios that have produced films with director "Nicholas Meyer" and "Walter Hill". | SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill" | [
"SELECT",
"Studio",
"FROM",
"film",
"WHERE",
"Director",
"=",
"``",
"Nicholas",
"Meyer",
"''",
"INTERSECT",
"SELECT",
"Studio",
"FROM",
"film",
"WHERE",
"Director",
"=",
"``",
"Walter",
"Hill",
"''"
] | [
"select",
"studio",
"from",
"film",
"where",
"director",
"=",
"value",
"intersect",
"select",
"studio",
"from",
"film",
"where",
"director",
"=",
"value"
] | [
"Show",
"the",
"studios",
"that",
"have",
"produced",
"films",
"with",
"director",
"``",
"Nicholas",
"Meyer",
"''",
"and",
"``",
"Walter",
"Hill",
"''",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill? | SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill" | [
"SELECT",
"Studio",
"FROM",
"film",
"WHERE",
"Director",
"=",
"``",
"Nicholas",
"Meyer",
"''",
"INTERSECT",
"SELECT",
"Studio",
"FROM",
"film",
"WHERE",
"Director",
"=",
"``",
"Walter",
"Hill",
"''"
] | [
"select",
"studio",
"from",
"film",
"where",
"director",
"=",
"value",
"intersect",
"select",
"studio",
"from",
"film",
"where",
"director",
"=",
"value"
] | [
"What",
"are",
"the",
"names",
"of",
"studios",
"that",
"have",
"produced",
"films",
"with",
"both",
"Nicholas",
"Meyer",
"and",
"Walter",
"Hill",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Find the titles and studios of the films that are produced by some film studios that contained the word "Universal". | SELECT title , Studio FROM film WHERE Studio LIKE "%Universal%" | [
"SELECT",
"title",
",",
"Studio",
"FROM",
"film",
"WHERE",
"Studio",
"LIKE",
"``",
"%",
"Universal",
"%",
"''"
] | [
"select",
"title",
",",
"studio",
"from",
"film",
"where",
"studio",
"like",
"value"
] | [
"Find",
"the",
"titles",
"and",
"studios",
"of",
"the",
"films",
"that",
"are",
"produced",
"by",
"some",
"film",
"studios",
"that",
"contained",
"the",
"word",
"``",
"Universal",
"''",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the titles and studios of films that have been produced by a studio whose name contains "Universal"? | SELECT title , Studio FROM film WHERE Studio LIKE "%Universal%" | [
"SELECT",
"title",
",",
"Studio",
"FROM",
"film",
"WHERE",
"Studio",
"LIKE",
"``",
"%",
"Universal",
"%",
"''"
] | [
"select",
"title",
",",
"studio",
"from",
"film",
"where",
"studio",
"like",
"value"
] | [
"What",
"are",
"the",
"titles",
"and",
"studios",
"of",
"films",
"that",
"have",
"been",
"produced",
"by",
"a",
"studio",
"whose",
"name",
"contains",
"``",
"Universal",
"''",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Show the studios that have not produced films with director "Walter Hill". | SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill" | [
"SELECT",
"Studio",
"FROM",
"film",
"EXCEPT",
"SELECT",
"Studio",
"FROM",
"film",
"WHERE",
"Director",
"=",
"``",
"Walter",
"Hill",
"''"
] | [
"select",
"studio",
"from",
"film",
"except",
"select",
"studio",
"from",
"film",
"where",
"director",
"=",
"value"
] | [
"Show",
"the",
"studios",
"that",
"have",
"not",
"produced",
"films",
"with",
"director",
"``",
"Walter",
"Hill",
"''",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Which studios have never worked with the director Walter Hill? | SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill" | [
"SELECT",
"Studio",
"FROM",
"film",
"EXCEPT",
"SELECT",
"Studio",
"FROM",
"film",
"WHERE",
"Director",
"=",
"``",
"Walter",
"Hill",
"''"
] | [
"select",
"studio",
"from",
"film",
"except",
"select",
"studio",
"from",
"film",
"where",
"director",
"=",
"value"
] | [
"Which",
"studios",
"have",
"never",
"worked",
"with",
"the",
"director",
"Walter",
"Hill",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | List the studios which average gross is above 4500000. | SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000 | [
"SELECT",
"Studio",
"FROM",
"film",
"GROUP",
"BY",
"Studio",
"HAVING",
"avg",
"(",
"Gross_in_dollar",
")",
">",
"=",
"4500000"
] | [
"select",
"studio",
"from",
"film",
"group",
"by",
"studio",
"having",
"avg",
"(",
"gross_in_dollar",
")",
">",
"=",
"value"
] | [
"List",
"the",
"studios",
"which",
"average",
"gross",
"is",
"above",
"4500000",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Which studios have an average gross of over 4500000? | SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000 | [
"SELECT",
"Studio",
"FROM",
"film",
"GROUP",
"BY",
"Studio",
"HAVING",
"avg",
"(",
"Gross_in_dollar",
")",
">",
"=",
"4500000"
] | [
"select",
"studio",
"from",
"film",
"group",
"by",
"studio",
"having",
"avg",
"(",
"gross_in_dollar",
")",
">",
"=",
"value"
] | [
"Which",
"studios",
"have",
"an",
"average",
"gross",
"of",
"over",
"4500000",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What is the title of the film that has the highest high market estimation. | 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 | [
"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"
] | [
"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",
"value"
] | [
"What",
"is",
"the",
"title",
"of",
"the",
"film",
"that",
"has",
"the",
"highest",
"high",
"market",
"estimation",
"."
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Return the title of the film with the highest high estimate? | 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 | [
"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"
] | [
"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",
"value"
] | [
"Return",
"the",
"title",
"of",
"the",
"film",
"with",
"the",
"highest",
"high",
"estimate",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | What are the titles and directors of the films were never presented in China? | 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') | [
"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",
"'",
")"
] | [
"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",
"=",
"value",
")"
] | [
"What",
"are",
"the",
"titles",
"and",
"directors",
"of",
"the",
"films",
"were",
"never",
"presented",
"in",
"China",
"?"
] |
film_rank | [
"CREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\"Studio\" text,\n\"Director\" text,\n\"Gross_in_dollar\" int,\nPRIMARY KEY (\"Film_ID\")\n);",
"CREATE TABLE \"market\" (\n\"Market_ID\" int,\n\"Country\" text,\n\"Number_cities\" int,\nPRIMARY KEY (\"Market_ID\")\n);",
"CREATE TABLE \"film_market_estimation\" (\n\"Estimation_ID\" int,\n\"Low_Estimate\" real,\n\"High_Estimate\" real,\n\"Film_ID\" int,\n\"Type\" text,\n\"Market_ID\" int,\n\"Year\" int,\nPRIMARY KEY (\"Estimation_ID\"),\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\n);"
] | Return the titles and directors of films that were never in the market of China. | 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') | [
"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",
"'",
")"
] | [
"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",
"=",
"value",
")"
] | [
"Return",
"the",
"titles",
"and",
"directors",
"of",
"films",
"that",
"were",
"never",
"in",
"the",
"market",
"of",
"China",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | How many calendar items do we have? | SELECT count(*) FROM Ref_calendar | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Ref_calendar"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"ref_calendar"
] | [
"How",
"many",
"calendar",
"items",
"do",
"we",
"have",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Count the number of all the calendar items. | SELECT count(*) FROM Ref_calendar | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Ref_calendar"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"ref_calendar"
] | [
"Count",
"the",
"number",
"of",
"all",
"the",
"calendar",
"items",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Show all calendar dates and day Numbers. | SELECT calendar_date , day_Number FROM Ref_calendar | [
"SELECT",
"calendar_date",
",",
"day_Number",
"FROM",
"Ref_calendar"
] | [
"select",
"calendar_date",
",",
"day_number",
"from",
"ref_calendar"
] | [
"Show",
"all",
"calendar",
"dates",
"and",
"day",
"Numbers",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What are all the calendar dates and day Numbers? | SELECT calendar_date , day_Number FROM Ref_calendar | [
"SELECT",
"calendar_date",
",",
"day_Number",
"FROM",
"Ref_calendar"
] | [
"select",
"calendar_date",
",",
"day_number",
"from",
"ref_calendar"
] | [
"What",
"are",
"all",
"the",
"calendar",
"dates",
"and",
"day",
"Numbers",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Show the number of document types. | SELECT count(*) FROM Ref_document_types | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Ref_document_types"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"ref_document_types"
] | [
"Show",
"the",
"number",
"of",
"document",
"types",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | How many document types are there? | SELECT count(*) FROM Ref_document_types | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Ref_document_types"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"ref_document_types"
] | [
"How",
"many",
"document",
"types",
"are",
"there",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | List all document type codes and document type names. | SELECT document_type_code , document_type_name FROM Ref_document_types | [
"SELECT",
"document_type_code",
",",
"document_type_name",
"FROM",
"Ref_document_types"
] | [
"select",
"document_type_code",
",",
"document_type_name",
"from",
"ref_document_types"
] | [
"List",
"all",
"document",
"type",
"codes",
"and",
"document",
"type",
"names",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What are all the document type codes and document type names? | SELECT document_type_code , document_type_name FROM Ref_document_types | [
"SELECT",
"document_type_code",
",",
"document_type_name",
"FROM",
"Ref_document_types"
] | [
"select",
"document_type_code",
",",
"document_type_name",
"from",
"ref_document_types"
] | [
"What",
"are",
"all",
"the",
"document",
"type",
"codes",
"and",
"document",
"type",
"names",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What is the name and description for document type code RV? | SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = "RV" | [
"SELECT",
"document_type_name",
",",
"document_type_description",
"FROM",
"Ref_document_types",
"WHERE",
"document_type_code",
"=",
"``",
"RV",
"''"
] | [
"select",
"document_type_name",
",",
"document_type_description",
"from",
"ref_document_types",
"where",
"document_type_code",
"=",
"value"
] | [
"What",
"is",
"the",
"name",
"and",
"description",
"for",
"document",
"type",
"code",
"RV",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Give me the name and description of the document type code RV. | SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = "RV" | [
"SELECT",
"document_type_name",
",",
"document_type_description",
"FROM",
"Ref_document_types",
"WHERE",
"document_type_code",
"=",
"``",
"RV",
"''"
] | [
"select",
"document_type_name",
",",
"document_type_description",
"from",
"ref_document_types",
"where",
"document_type_code",
"=",
"value"
] | [
"Give",
"me",
"the",
"name",
"and",
"description",
"of",
"the",
"document",
"type",
"code",
"RV",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What is the document type code for document type "Paper"? | SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper" | [
"SELECT",
"document_type_code",
"FROM",
"Ref_document_types",
"WHERE",
"document_type_name",
"=",
"``",
"Paper",
"''"
] | [
"select",
"document_type_code",
"from",
"ref_document_types",
"where",
"document_type_name",
"=",
"value"
] | [
"What",
"is",
"the",
"document",
"type",
"code",
"for",
"document",
"type",
"``",
"Paper",
"''",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Find the code of the document type "Paper". | SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper" | [
"SELECT",
"document_type_code",
"FROM",
"Ref_document_types",
"WHERE",
"document_type_name",
"=",
"``",
"Paper",
"''"
] | [
"select",
"document_type_code",
"from",
"ref_document_types",
"where",
"document_type_name",
"=",
"value"
] | [
"Find",
"the",
"code",
"of",
"the",
"document",
"type",
"``",
"Paper",
"''",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Show the number of documents with document type code CV or BK. | SELECT count(*) FROM All_documents WHERE document_type_code = "CV" OR document_type_code = "BK" | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"All_documents",
"WHERE",
"document_type_code",
"=",
"``",
"CV",
"''",
"OR",
"document_type_code",
"=",
"``",
"BK",
"''"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"all_documents",
"where",
"document_type_code",
"=",
"value",
"or",
"document_type_code",
"=",
"value"
] | [
"Show",
"the",
"number",
"of",
"documents",
"with",
"document",
"type",
"code",
"CV",
"or",
"BK",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | How many documents have document type code CV or BK? | SELECT count(*) FROM All_documents WHERE document_type_code = "CV" OR document_type_code = "BK" | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"All_documents",
"WHERE",
"document_type_code",
"=",
"``",
"CV",
"''",
"OR",
"document_type_code",
"=",
"``",
"BK",
"''"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"all_documents",
"where",
"document_type_code",
"=",
"value",
"or",
"document_type_code",
"=",
"value"
] | [
"How",
"many",
"documents",
"have",
"document",
"type",
"code",
"CV",
"or",
"BK",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What is the date when the document "Marry CV" was stored? | SELECT date_stored FROM All_documents WHERE Document_name = "Marry CV" | [
"SELECT",
"date_stored",
"FROM",
"All_documents",
"WHERE",
"Document_name",
"=",
"``",
"Marry",
"CV",
"''"
] | [
"select",
"date_stored",
"from",
"all_documents",
"where",
"document_name",
"=",
"value"
] | [
"What",
"is",
"the",
"date",
"when",
"the",
"document",
"``",
"Marry",
"CV",
"''",
"was",
"stored",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | When was the document named "Marry CV" stored? Give me the date. | SELECT date_stored FROM All_documents WHERE Document_name = "Marry CV" | [
"SELECT",
"date_stored",
"FROM",
"All_documents",
"WHERE",
"Document_name",
"=",
"``",
"Marry",
"CV",
"''"
] | [
"select",
"date_stored",
"from",
"all_documents",
"where",
"document_name",
"=",
"value"
] | [
"When",
"was",
"the",
"document",
"named",
"``",
"Marry",
"CV",
"''",
"stored",
"?",
"Give",
"me",
"the",
"date",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What is the day Number and date of all the documents? | SELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date | [
"SELECT",
"T2.day_Number",
",",
"T1.Date_Stored",
"FROM",
"All_documents",
"AS",
"T1",
"JOIN",
"Ref_calendar",
"AS",
"T2",
"ON",
"T1.date_stored",
"=",
"T2.calendar_date"
] | [
"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",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Return the day Number and stored date for all the documents. | SELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date | [
"SELECT",
"T2.day_Number",
",",
"T1.Date_Stored",
"FROM",
"All_documents",
"AS",
"T1",
"JOIN",
"Ref_calendar",
"AS",
"T2",
"ON",
"T1.date_stored",
"=",
"T2.calendar_date"
] | [
"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",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What is the document type name for the document with name "How to read a book"? | 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" | [
"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",
"''"
] | [
"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",
"=",
"value"
] | [
"What",
"is",
"the",
"document",
"type",
"name",
"for",
"the",
"document",
"with",
"name",
"``",
"How",
"to",
"read",
"a",
"book",
"''",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Find the document type name of the document named "How to read a book". | 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" | [
"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",
"''"
] | [
"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",
"=",
"value"
] | [
"Find",
"the",
"document",
"type",
"name",
"of",
"the",
"document",
"named",
"``",
"How",
"to",
"read",
"a",
"book",
"''",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Show the number of locations. | SELECT count(*) FROM Ref_locations | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Ref_locations"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"ref_locations"
] | [
"Show",
"the",
"number",
"of",
"locations",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | How many locations are listed in the database? | SELECT count(*) FROM Ref_locations | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Ref_locations"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"ref_locations"
] | [
"How",
"many",
"locations",
"are",
"listed",
"in",
"the",
"database",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | List all location codes and location names. | SELECT location_code , location_name FROM Ref_locations | [
"SELECT",
"location_code",
",",
"location_name",
"FROM",
"Ref_locations"
] | [
"select",
"location_code",
",",
"location_name",
"from",
"ref_locations"
] | [
"List",
"all",
"location",
"codes",
"and",
"location",
"names",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What are all the location codes and location names? | SELECT location_code , location_name FROM Ref_locations | [
"SELECT",
"location_code",
",",
"location_name",
"FROM",
"Ref_locations"
] | [
"select",
"location_code",
",",
"location_name",
"from",
"ref_locations"
] | [
"What",
"are",
"all",
"the",
"location",
"codes",
"and",
"location",
"names",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What are the name and description for location code x? | SELECT location_name , location_description FROM Ref_locations WHERE location_code = "x" | [
"SELECT",
"location_name",
",",
"location_description",
"FROM",
"Ref_locations",
"WHERE",
"location_code",
"=",
"``",
"x",
"''"
] | [
"select",
"location_name",
",",
"location_description",
"from",
"ref_locations",
"where",
"location_code",
"=",
"value"
] | [
"What",
"are",
"the",
"name",
"and",
"description",
"for",
"location",
"code",
"x",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Give me the name and description of the location with code x. | SELECT location_name , location_description FROM Ref_locations WHERE location_code = "x" | [
"SELECT",
"location_name",
",",
"location_description",
"FROM",
"Ref_locations",
"WHERE",
"location_code",
"=",
"``",
"x",
"''"
] | [
"select",
"location_name",
",",
"location_description",
"from",
"ref_locations",
"where",
"location_code",
"=",
"value"
] | [
"Give",
"me",
"the",
"name",
"and",
"description",
"of",
"the",
"location",
"with",
"code",
"x",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What is the location code for the country "Canada"? | SELECT location_code FROM Ref_locations WHERE location_name = "Canada" | [
"SELECT",
"location_code",
"FROM",
"Ref_locations",
"WHERE",
"location_name",
"=",
"``",
"Canada",
"''"
] | [
"select",
"location_code",
"from",
"ref_locations",
"where",
"location_name",
"=",
"value"
] | [
"What",
"is",
"the",
"location",
"code",
"for",
"the",
"country",
"``",
"Canada",
"''",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Show the location code of the country "Canada". | SELECT location_code FROM Ref_locations WHERE location_name = "Canada" | [
"SELECT",
"location_code",
"FROM",
"Ref_locations",
"WHERE",
"location_name",
"=",
"``",
"Canada",
"''"
] | [
"select",
"location_code",
"from",
"ref_locations",
"where",
"location_name",
"=",
"value"
] | [
"Show",
"the",
"location",
"code",
"of",
"the",
"country",
"``",
"Canada",
"''",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | How many roles are there? | SELECT count(*) FROM ROLES | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"ROLES"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"roles"
] | [
"How",
"many",
"roles",
"are",
"there",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Count the total number of roles listed. | SELECT count(*) FROM ROLES | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"ROLES"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"roles"
] | [
"Count",
"the",
"total",
"number",
"of",
"roles",
"listed",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | List all role codes, role names, and role descriptions. | SELECT role_code , role_name , role_description FROM ROLES | [
"SELECT",
"role_code",
",",
"role_name",
",",
"role_description",
"FROM",
"ROLES"
] | [
"select",
"role_code",
",",
"role_name",
",",
"role_description",
"from",
"roles"
] | [
"List",
"all",
"role",
"codes",
",",
"role",
"names",
",",
"and",
"role",
"descriptions",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What are all the role codes, role names, and role descriptions? | SELECT role_code , role_name , role_description FROM ROLES | [
"SELECT",
"role_code",
",",
"role_name",
",",
"role_description",
"FROM",
"ROLES"
] | [
"select",
"role_code",
",",
"role_name",
",",
"role_description",
"from",
"roles"
] | [
"What",
"are",
"all",
"the",
"role",
"codes",
",",
"role",
"names",
",",
"and",
"role",
"descriptions",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What are the name and description for role code "MG"? | SELECT role_name , role_description FROM ROLES WHERE role_code = "MG" | [
"SELECT",
"role_name",
",",
"role_description",
"FROM",
"ROLES",
"WHERE",
"role_code",
"=",
"``",
"MG",
"''"
] | [
"select",
"role_name",
",",
"role_description",
"from",
"roles",
"where",
"role_code",
"=",
"value"
] | [
"What",
"are",
"the",
"name",
"and",
"description",
"for",
"role",
"code",
"``",
"MG",
"''",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Find the name and description of the role with code "MG". | SELECT role_name , role_description FROM ROLES WHERE role_code = "MG" | [
"SELECT",
"role_name",
",",
"role_description",
"FROM",
"ROLES",
"WHERE",
"role_code",
"=",
"``",
"MG",
"''"
] | [
"select",
"role_name",
",",
"role_description",
"from",
"roles",
"where",
"role_code",
"=",
"value"
] | [
"Find",
"the",
"name",
"and",
"description",
"of",
"the",
"role",
"with",
"code",
"``",
"MG",
"''",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Show the description for role name "Proof Reader". | SELECT role_description FROM ROLES WHERE role_name = "Proof Reader" | [
"SELECT",
"role_description",
"FROM",
"ROLES",
"WHERE",
"role_name",
"=",
"``",
"Proof",
"Reader",
"''"
] | [
"select",
"role_description",
"from",
"roles",
"where",
"role_name",
"=",
"value"
] | [
"Show",
"the",
"description",
"for",
"role",
"name",
"``",
"Proof",
"Reader",
"''",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What is the description of the role named "Proof Reader"? | SELECT role_description FROM ROLES WHERE role_name = "Proof Reader" | [
"SELECT",
"role_description",
"FROM",
"ROLES",
"WHERE",
"role_name",
"=",
"``",
"Proof",
"Reader",
"''"
] | [
"select",
"role_description",
"from",
"roles",
"where",
"role_name",
"=",
"value"
] | [
"What",
"is",
"the",
"description",
"of",
"the",
"role",
"named",
"``",
"Proof",
"Reader",
"''",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | How many employees do we have? | SELECT count(*) FROM Employees | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Employees"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"employees"
] | [
"How",
"many",
"employees",
"do",
"we",
"have",
"?"
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Find the number of employees we have. | SELECT count(*) FROM Employees | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Employees"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"employees"
] | [
"Find",
"the",
"number",
"of",
"employees",
"we",
"have",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | Show the name, role code, and date of birth for the employee with name 'Armani'. | SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani' | [
"SELECT",
"employee_name",
",",
"role_code",
",",
"date_of_birth",
"FROM",
"Employees",
"WHERE",
"employee_Name",
"=",
"'Armani",
"'"
] | [
"select",
"employee_name",
",",
"role_code",
",",
"date_of_birth",
"from",
"employees",
"where",
"employee_name",
"=",
"value"
] | [
"Show",
"the",
"name",
",",
"role",
"code",
",",
"and",
"date",
"of",
"birth",
"for",
"the",
"employee",
"with",
"name",
"'Armani",
"'",
"."
] |
cre_Doc_Tracking_DB | [
"CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);",
"CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);",
"CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);",
"CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);",
"CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);",
"CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);",
"CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);",
"CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);"
] | What are the name, role code, and date of birth of the employee named 'Armani'? | SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani' | [
"SELECT",
"employee_name",
",",
"role_code",
",",
"date_of_birth",
"FROM",
"Employees",
"WHERE",
"employee_Name",
"=",
"'Armani",
"'"
] | [
"select",
"employee_name",
",",
"role_code",
",",
"date_of_birth",
"from",
"employees",
"where",
"employee_name",
"=",
"value"
] | [
"What",
"are",
"the",
"name",
",",
"role",
"code",
",",
"and",
"date",
"of",
"birth",
"of",
"the",
"employee",
"named",
"'Armani",
"'",
"?"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.