db_id stringclasses 20
values | query stringlengths 20 422 | question stringlengths 18 174 | query_toks listlengths 4 63 | query_toks_no_value listlengths 4 88 | question_toks listlengths 5 33 | schema stringclasses 20
values |
|---|---|---|---|---|---|---|
cre_Doc_Template_Mgt | SELECT document_id , document_name , document_description FROM Documents | What are the ids, names, and descriptions for all documents? | [
"SELECT",
"document_id",
",",
"document_name",
",",
"document_description",
"FROM",
"Documents"
] | [
"select",
"document_id",
",",
"document_name",
",",
"document_description",
"from",
"documents"
] | [
"What",
"are",
"the",
"ids",
",",
"names",
",",
"and",
"descriptions",
"for",
"all",
"documents",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE "%w%" | What is the document name and template id for document with description with the letter 'w' in it? | [
"SELECT",
"document_name",
",",
"template_id",
"FROM",
"Documents",
"WHERE",
"Document_Description",
"LIKE",
"``",
"%",
"w",
"%",
"''"
] | [
"select",
"document_name",
",",
"template_id",
"from",
"documents",
"where",
"document_description",
"like",
"value"
] | [
"What",
"is",
"the",
"document",
"name",
"and",
"template",
"id",
"for",
"document",
"with",
"description",
"with",
"the",
"letter",
"'w",
"'",
"in",
"it",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE "%w%" | Return the names and template ids for documents that contain the letter w in their description. | [
"SELECT",
"document_name",
",",
"template_id",
"FROM",
"Documents",
"WHERE",
"Document_Description",
"LIKE",
"``",
"%",
"w",
"%",
"''"
] | [
"select",
"document_name",
",",
"template_id",
"from",
"documents",
"where",
"document_description",
"like",
"value"
] | [
"Return",
"the",
"names",
"and",
"template",
"ids",
"for",
"documents",
"that",
"contain",
"the",
"letter",
"w",
"in",
"their",
"description",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = "Robbin CV" | What is the document id, template id and description for document named "Robbin CV"? | [
"SELECT",
"document_id",
",",
"template_id",
",",
"Document_Description",
"FROM",
"Documents",
"WHERE",
"document_name",
"=",
"``",
"Robbin",
"CV",
"''"
] | [
"select",
"document_id",
",",
"template_id",
",",
"document_description",
"from",
"documents",
"where",
"document_name",
"=",
"value"
] | [
"What",
"is",
"the",
"document",
"id",
",",
"template",
"id",
"and",
"description",
"for",
"document",
"named",
"``",
"Robbin",
"CV",
"''",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = "Robbin CV" | Return the document id, template id, and description for the document with the name Robbin CV. | [
"SELECT",
"document_id",
",",
"template_id",
",",
"Document_Description",
"FROM",
"Documents",
"WHERE",
"document_name",
"=",
"``",
"Robbin",
"CV",
"''"
] | [
"select",
"document_id",
",",
"template_id",
",",
"document_description",
"from",
"documents",
"where",
"document_name",
"=",
"value"
] | [
"Return",
"the",
"document",
"id",
",",
"template",
"id",
",",
"and",
"description",
"for",
"the",
"document",
"with",
"the",
"name",
"Robbin",
"CV",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(DISTINCT template_id) FROM Documents | How many different templates do all document use? | [
"SELECT",
"count",
"(",
"DISTINCT",
"template_id",
")",
"FROM",
"Documents"
] | [
"select",
"count",
"(",
"distinct",
"template_id",
")",
"from",
"documents"
] | [
"How",
"many",
"different",
"templates",
"do",
"all",
"document",
"use",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(DISTINCT template_id) FROM Documents | Count the number of different templates used for documents. | [
"SELECT",
"count",
"(",
"DISTINCT",
"template_id",
")",
"FROM",
"Documents"
] | [
"select",
"count",
"(",
"distinct",
"template_id",
")",
"from",
"documents"
] | [
"Count",
"the",
"number",
"of",
"different",
"templates",
"used",
"for",
"documents",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT' | How many documents are using the template with type code 'PPT'? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Documents",
"AS",
"T1",
"JOIN",
"Templates",
"AS",
"T2",
"ON",
"T1.Template_ID",
"=",
"T2.Template_ID",
"WHERE",
"T2.Template_Type_Code",
"=",
"'PPT",
"'"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"documents",
"as",
"t1",
"join",
"templates",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"where",
"t2",
".",
"template_type_code",
"=",
"value"
] | [
"How",
"many",
"documents",
"are",
"using",
"the",
"template",
"with",
"type",
"code",
"'PPT",
"'",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT' | Count the number of documents that use the PPT template type. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Documents",
"AS",
"T1",
"JOIN",
"Templates",
"AS",
"T2",
"ON",
"T1.Template_ID",
"=",
"T2.Template_ID",
"WHERE",
"T2.Template_Type_Code",
"=",
"'PPT",
"'"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"documents",
"as",
"t1",
"join",
"templates",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"where",
"t2",
".",
"template_type_code",
"=",
"value"
] | [
"Count",
"the",
"number",
"of",
"documents",
"that",
"use",
"the",
"PPT",
"template",
"type",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_id , count(*) FROM Documents GROUP BY template_id | Show all template ids and number of documents using each template. | [
"SELECT",
"template_id",
",",
"count",
"(",
"*",
")",
"FROM",
"Documents",
"GROUP",
"BY",
"template_id"
] | [
"select",
"template_id",
",",
"count",
"(",
"*",
")",
"from",
"documents",
"group",
"by",
"template_id"
] | [
"Show",
"all",
"template",
"ids",
"and",
"number",
"of",
"documents",
"using",
"each",
"template",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_id , count(*) FROM Documents GROUP BY template_id | What are all different template ids used for documents, and how many times were each of them used? | [
"SELECT",
"template_id",
",",
"count",
"(",
"*",
")",
"FROM",
"Documents",
"GROUP",
"BY",
"template_id"
] | [
"select",
"template_id",
",",
"count",
"(",
"*",
")",
"from",
"documents",
"group",
"by",
"template_id"
] | [
"What",
"are",
"all",
"different",
"template",
"ids",
"used",
"for",
"documents",
",",
"and",
"how",
"many",
"times",
"were",
"each",
"of",
"them",
"used",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1 | What is the id and type code for the template used by the most documents? | [
"SELECT",
"T1.template_id",
",",
"T2.Template_Type_Code",
"FROM",
"Documents",
"AS",
"T1",
"JOIN",
"Templates",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id",
"GROUP",
"BY",
"T1.template_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1... | [
"select",
"t1",
".",
"template_id",
",",
"t2",
".",
"template_type_code",
"from",
"documents",
"as",
"t1",
"join",
"templates",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"group",
"by",
"t1",
".",
"template_id",
"order",
"by... | [
"What",
"is",
"the",
"id",
"and",
"type",
"code",
"for",
"the",
"template",
"used",
"by",
"the",
"most",
"documents",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1 | Return the id and type code of the template that is used for the greatest number of documents. | [
"SELECT",
"T1.template_id",
",",
"T2.Template_Type_Code",
"FROM",
"Documents",
"AS",
"T1",
"JOIN",
"Templates",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id",
"GROUP",
"BY",
"T1.template_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1... | [
"select",
"t1",
".",
"template_id",
",",
"t2",
".",
"template_type_code",
"from",
"documents",
"as",
"t1",
"join",
"templates",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"group",
"by",
"t1",
".",
"template_id",
"order",
"by... | [
"Return",
"the",
"id",
"and",
"type",
"code",
"of",
"the",
"template",
"that",
"is",
"used",
"for",
"the",
"greatest",
"number",
"of",
"documents",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1 | Show ids for all templates that are used by more than one document. | [
"SELECT",
"template_id",
"FROM",
"Documents",
"GROUP",
"BY",
"template_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"1"
] | [
"select",
"template_id",
"from",
"documents",
"group",
"by",
"template_id",
"having",
"count",
"(",
"*",
")",
">",
"value"
] | [
"Show",
"ids",
"for",
"all",
"templates",
"that",
"are",
"used",
"by",
"more",
"than",
"one",
"document",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1 | What are the template ids of any templates used in more than a single document? | [
"SELECT",
"template_id",
"FROM",
"Documents",
"GROUP",
"BY",
"template_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"1"
] | [
"select",
"template_id",
"from",
"documents",
"group",
"by",
"template_id",
"having",
"count",
"(",
"*",
")",
">",
"value"
] | [
"What",
"are",
"the",
"template",
"ids",
"of",
"any",
"templates",
"used",
"in",
"more",
"than",
"a",
"single",
"document",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents | Show ids for all templates not used by any document. | [
"SELECT",
"template_id",
"FROM",
"Templates",
"EXCEPT",
"SELECT",
"template_id",
"FROM",
"Documents"
] | [
"select",
"template_id",
"from",
"templates",
"except",
"select",
"template_id",
"from",
"documents"
] | [
"Show",
"ids",
"for",
"all",
"templates",
"not",
"used",
"by",
"any",
"document",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents | What are the ids for templates that are not used in any documents? | [
"SELECT",
"template_id",
"FROM",
"Templates",
"EXCEPT",
"SELECT",
"template_id",
"FROM",
"Documents"
] | [
"select",
"template_id",
"from",
"templates",
"except",
"select",
"template_id",
"from",
"documents"
] | [
"What",
"are",
"the",
"ids",
"for",
"templates",
"that",
"are",
"not",
"used",
"in",
"any",
"documents",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(*) FROM Templates | How many templates do we have? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Templates"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"templates"
] | [
"How",
"many",
"templates",
"do",
"we",
"have",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(*) FROM Templates | Count the number of templates. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Templates"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"templates"
] | [
"Count",
"the",
"number",
"of",
"templates",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_id , version_number , template_type_code FROM Templates | Show template ids, version numbers, and template type codes for all templates. | [
"SELECT",
"template_id",
",",
"version_number",
",",
"template_type_code",
"FROM",
"Templates"
] | [
"select",
"template_id",
",",
"version_number",
",",
"template_type_code",
"from",
"templates"
] | [
"Show",
"template",
"ids",
",",
"version",
"numbers",
",",
"and",
"template",
"type",
"codes",
"for",
"all",
"templates",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_id , version_number , template_type_code FROM Templates | What are the ids, version numbers, and type codes for each template? | [
"SELECT",
"template_id",
",",
"version_number",
",",
"template_type_code",
"FROM",
"Templates"
] | [
"select",
"template_id",
",",
"version_number",
",",
"template_type_code",
"from",
"templates"
] | [
"What",
"are",
"the",
"ids",
",",
"version",
"numbers",
",",
"and",
"type",
"codes",
"for",
"each",
"template",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT DISTINCT template_type_code FROM Templates | Show all distinct template type codes for all templates. | [
"SELECT",
"DISTINCT",
"template_type_code",
"FROM",
"Templates"
] | [
"select",
"distinct",
"template_type_code",
"from",
"templates"
] | [
"Show",
"all",
"distinct",
"template",
"type",
"codes",
"for",
"all",
"templates",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT DISTINCT template_type_code FROM Templates | What are the different template type codes? | [
"SELECT",
"DISTINCT",
"template_type_code",
"FROM",
"Templates"
] | [
"select",
"distinct",
"template_type_code",
"from",
"templates"
] | [
"What",
"are",
"the",
"different",
"template",
"type",
"codes",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_id FROM Templates WHERE template_type_code = "PP" OR template_type_code = "PPT" | What are the ids of templates with template type code PP or PPT? | [
"SELECT",
"template_id",
"FROM",
"Templates",
"WHERE",
"template_type_code",
"=",
"``",
"PP",
"''",
"OR",
"template_type_code",
"=",
"``",
"PPT",
"''"
] | [
"select",
"template_id",
"from",
"templates",
"where",
"template_type_code",
"=",
"value",
"or",
"template_type_code",
"=",
"value"
] | [
"What",
"are",
"the",
"ids",
"of",
"templates",
"with",
"template",
"type",
"code",
"PP",
"or",
"PPT",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_id FROM Templates WHERE template_type_code = "PP" OR template_type_code = "PPT" | Return the ids of templates that have the code PP or PPT. | [
"SELECT",
"template_id",
"FROM",
"Templates",
"WHERE",
"template_type_code",
"=",
"``",
"PP",
"''",
"OR",
"template_type_code",
"=",
"``",
"PPT",
"''"
] | [
"select",
"template_id",
"from",
"templates",
"where",
"template_type_code",
"=",
"value",
"or",
"template_type_code",
"=",
"value"
] | [
"Return",
"the",
"ids",
"of",
"templates",
"that",
"have",
"the",
"code",
"PP",
"or",
"PPT",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(*) FROM Templates WHERE template_type_code = "CV" | How many templates have template type code CV? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Templates",
"WHERE",
"template_type_code",
"=",
"``",
"CV",
"''"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"templates",
"where",
"template_type_code",
"=",
"value"
] | [
"How",
"many",
"templates",
"have",
"template",
"type",
"code",
"CV",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(*) FROM Templates WHERE template_type_code = "CV" | Count the number of templates of the type CV. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Templates",
"WHERE",
"template_type_code",
"=",
"``",
"CV",
"''"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"templates",
"where",
"template_type_code",
"=",
"value"
] | [
"Count",
"the",
"number",
"of",
"templates",
"of",
"the",
"type",
"CV",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT version_number , template_type_code FROM Templates WHERE version_number > 5 | What is the version number and template type code for the template with version number later than 5? | [
"SELECT",
"version_number",
",",
"template_type_code",
"FROM",
"Templates",
"WHERE",
"version_number",
">",
"5"
] | [
"select",
"version_number",
",",
"template_type_code",
"from",
"templates",
"where",
"version_number",
">",
"value"
] | [
"What",
"is",
"the",
"version",
"number",
"and",
"template",
"type",
"code",
"for",
"the",
"template",
"with",
"version",
"number",
"later",
"than",
"5",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT version_number , template_type_code FROM Templates WHERE version_number > 5 | Return the version numbers and template type codes of templates with a version number greater than 5. | [
"SELECT",
"version_number",
",",
"template_type_code",
"FROM",
"Templates",
"WHERE",
"version_number",
">",
"5"
] | [
"select",
"version_number",
",",
"template_type_code",
"from",
"templates",
"where",
"version_number",
">",
"value"
] | [
"Return",
"the",
"version",
"numbers",
"and",
"template",
"type",
"codes",
"of",
"templates",
"with",
"a",
"version",
"number",
"greater",
"than",
"5",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code | Show all template type codes and number of templates for each. | [
"SELECT",
"template_type_code",
",",
"count",
"(",
"*",
")",
"FROM",
"Templates",
"GROUP",
"BY",
"template_type_code"
] | [
"select",
"template_type_code",
",",
"count",
"(",
"*",
")",
"from",
"templates",
"group",
"by",
"template_type_code"
] | [
"Show",
"all",
"template",
"type",
"codes",
"and",
"number",
"of",
"templates",
"for",
"each",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code | What are the different template type codes, and how many templates correspond to each? | [
"SELECT",
"template_type_code",
",",
"count",
"(",
"*",
")",
"FROM",
"Templates",
"GROUP",
"BY",
"template_type_code"
] | [
"select",
"template_type_code",
",",
"count",
"(",
"*",
")",
"from",
"templates",
"group",
"by",
"template_type_code"
] | [
"What",
"are",
"the",
"different",
"template",
"type",
"codes",
",",
"and",
"how",
"many",
"templates",
"correspond",
"to",
"each",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1 | Which template type code has most number of templates? | [
"SELECT",
"template_type_code",
"FROM",
"Templates",
"GROUP",
"BY",
"template_type_code",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"template_type_code",
"from",
"templates",
"group",
"by",
"template_type_code",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"Which",
"template",
"type",
"code",
"has",
"most",
"number",
"of",
"templates",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1 | Return the type code of the template type that the most templates belong to. | [
"SELECT",
"template_type_code",
"FROM",
"Templates",
"GROUP",
"BY",
"template_type_code",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"template_type_code",
"from",
"templates",
"group",
"by",
"template_type_code",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"Return",
"the",
"type",
"code",
"of",
"the",
"template",
"type",
"that",
"the",
"most",
"templates",
"belong",
"to",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3 | Show all template type codes with less than three templates. | [
"SELECT",
"template_type_code",
"FROM",
"Templates",
"GROUP",
"BY",
"template_type_code",
"HAVING",
"count",
"(",
"*",
")",
"<",
"3"
] | [
"select",
"template_type_code",
"from",
"templates",
"group",
"by",
"template_type_code",
"having",
"count",
"(",
"*",
")",
"<",
"value"
] | [
"Show",
"all",
"template",
"type",
"codes",
"with",
"less",
"than",
"three",
"templates",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3 | What are the codes of template types that have fewer than 3 templates? | [
"SELECT",
"template_type_code",
"FROM",
"Templates",
"GROUP",
"BY",
"template_type_code",
"HAVING",
"count",
"(",
"*",
")",
"<",
"3"
] | [
"select",
"template_type_code",
"from",
"templates",
"group",
"by",
"template_type_code",
"having",
"count",
"(",
"*",
")",
"<",
"value"
] | [
"What",
"are",
"the",
"codes",
"of",
"template",
"types",
"that",
"have",
"fewer",
"than",
"3",
"templates",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT min(Version_Number) , template_type_code FROM Templates | What the smallest version number and its template type code? | [
"SELECT",
"min",
"(",
"Version_Number",
")",
",",
"template_type_code",
"FROM",
"Templates"
] | [
"select",
"min",
"(",
"version_number",
")",
",",
"template_type_code",
"from",
"templates"
] | [
"What",
"the",
"smallest",
"version",
"number",
"and",
"its",
"template",
"type",
"code",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT min(Version_Number) , template_type_code FROM Templates | Return the lowest version number, along with its corresponding template type code. | [
"SELECT",
"min",
"(",
"Version_Number",
")",
",",
"template_type_code",
"FROM",
"Templates"
] | [
"select",
"min",
"(",
"version_number",
")",
",",
"template_type_code",
"from",
"templates"
] | [
"Return",
"the",
"lowest",
"version",
"number",
",",
"along",
"with",
"its",
"corresponding",
"template",
"type",
"code",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = "Data base" | What is the template type code of the template used by document with the name "Data base"? | [
"SELECT",
"T1.template_type_code",
"FROM",
"Templates",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id",
"WHERE",
"T2.document_name",
"=",
"``",
"Data",
"base",
"''"
] | [
"select",
"t1",
".",
"template_type_code",
"from",
"templates",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"where",
"t2",
".",
"document_name",
"=",
"value"
] | [
"What",
"is",
"the",
"template",
"type",
"code",
"of",
"the",
"template",
"used",
"by",
"document",
"with",
"the",
"name",
"``",
"Data",
"base",
"''",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = "Data base" | Return the template type code of the template that is used by a document named Data base. | [
"SELECT",
"T1.template_type_code",
"FROM",
"Templates",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id",
"WHERE",
"T2.document_name",
"=",
"``",
"Data",
"base",
"''"
] | [
"select",
"t1",
".",
"template_type_code",
"from",
"templates",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"where",
"t2",
".",
"document_name",
"=",
"value"
] | [
"Return",
"the",
"template",
"type",
"code",
"of",
"the",
"template",
"that",
"is",
"used",
"by",
"a",
"document",
"named",
"Data",
"base",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK" | Show all document names using templates with template type code BK. | [
"SELECT",
"T2.document_name",
"FROM",
"Templates",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id",
"WHERE",
"T1.template_type_code",
"=",
"``",
"BK",
"''"
] | [
"select",
"t2",
".",
"document_name",
"from",
"templates",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"where",
"t1",
".",
"template_type_code",
"=",
"value"
] | [
"Show",
"all",
"document",
"names",
"using",
"templates",
"with",
"template",
"type",
"code",
"BK",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK" | What are the names of documents that use templates with the code BK? | [
"SELECT",
"T2.document_name",
"FROM",
"Templates",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id",
"WHERE",
"T1.template_type_code",
"=",
"``",
"BK",
"''"
] | [
"select",
"t2",
".",
"document_name",
"from",
"templates",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"where",
"t1",
".",
"template_type_code",
"=",
"value"
] | [
"What",
"are",
"the",
"names",
"of",
"documents",
"that",
"use",
"templates",
"with",
"the",
"code",
"BK",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code | Show all template type codes and the number of documents using each type. | [
"SELECT",
"T1.template_type_code",
",",
"count",
"(",
"*",
")",
"FROM",
"Templates",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id",
"GROUP",
"BY",
"T1.template_type_code"
] | [
"select",
"t1",
".",
"template_type_code",
",",
"count",
"(",
"*",
")",
"from",
"templates",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"group",
"by",
"t1",
".",
"template_type_code"
] | [
"Show",
"all",
"template",
"type",
"codes",
"and",
"the",
"number",
"of",
"documents",
"using",
"each",
"type",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code | What are the different template type codes, and how many documents use each type? | [
"SELECT",
"T1.template_type_code",
",",
"count",
"(",
"*",
")",
"FROM",
"Templates",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id",
"GROUP",
"BY",
"T1.template_type_code"
] | [
"select",
"t1",
".",
"template_type_code",
",",
"count",
"(",
"*",
")",
"from",
"templates",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"group",
"by",
"t1",
".",
"template_type_code"
] | [
"What",
"are",
"the",
"different",
"template",
"type",
"codes",
",",
"and",
"how",
"many",
"documents",
"use",
"each",
"type",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1 | Which template type code is used by most number of documents? | [
"SELECT",
"T1.template_type_code",
"FROM",
"Templates",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id",
"GROUP",
"BY",
"T1.template_type_code",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"template_type_code",
"from",
"templates",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"group",
"by",
"t1",
".",
"template_type_code",
"order",
"by",
"count",
"(",
"*",
")... | [
"Which",
"template",
"type",
"code",
"is",
"used",
"by",
"most",
"number",
"of",
"documents",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1 | Return the code of the template type that is most commonly used in documents. | [
"SELECT",
"T1.template_type_code",
"FROM",
"Templates",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id",
"GROUP",
"BY",
"T1.template_type_code",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"template_type_code",
"from",
"templates",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id",
"group",
"by",
"t1",
".",
"template_type_code",
"order",
"by",
"count",
"(",
"*",
")... | [
"Return",
"the",
"code",
"of",
"the",
"template",
"type",
"that",
"is",
"most",
"commonly",
"used",
"in",
"documents",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id | Show all template type codes that are not used by any document. | [
"SELECT",
"template_type_code",
"FROM",
"Templates",
"EXCEPT",
"SELECT",
"template_type_code",
"FROM",
"Templates",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id"
] | [
"select",
"template_type_code",
"from",
"templates",
"except",
"select",
"template_type_code",
"from",
"templates",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id"
] | [
"Show",
"all",
"template",
"type",
"codes",
"that",
"are",
"not",
"used",
"by",
"any",
"document",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id | What are the codes of template types that are not used for any document? | [
"SELECT",
"template_type_code",
"FROM",
"Templates",
"EXCEPT",
"SELECT",
"template_type_code",
"FROM",
"Templates",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.template_id",
"=",
"T2.template_id"
] | [
"select",
"template_type_code",
"from",
"templates",
"except",
"select",
"template_type_code",
"from",
"templates",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"template_id",
"=",
"t2",
".",
"template_id"
] | [
"What",
"are",
"the",
"codes",
"of",
"template",
"types",
"that",
"are",
"not",
"used",
"for",
"any",
"document",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code , template_type_description FROM Ref_template_types | Show all template type codes and descriptions. | [
"SELECT",
"template_type_code",
",",
"template_type_description",
"FROM",
"Ref_template_types"
] | [
"select",
"template_type_code",
",",
"template_type_description",
"from",
"ref_template_types"
] | [
"Show",
"all",
"template",
"type",
"codes",
"and",
"descriptions",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code , template_type_description FROM Ref_template_types | What are the type codes and descriptions for all template types? | [
"SELECT",
"template_type_code",
",",
"template_type_description",
"FROM",
"Ref_template_types"
] | [
"select",
"template_type_code",
",",
"template_type_description",
"from",
"ref_template_types"
] | [
"What",
"are",
"the",
"type",
"codes",
"and",
"descriptions",
"for",
"all",
"template",
"types",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_description FROM Ref_template_types WHERE template_type_code = "AD" | What is the template type descriptions for template type code "AD". | [
"SELECT",
"template_type_description",
"FROM",
"Ref_template_types",
"WHERE",
"template_type_code",
"=",
"``",
"AD",
"''"
] | [
"select",
"template_type_description",
"from",
"ref_template_types",
"where",
"template_type_code",
"=",
"value"
] | [
"What",
"is",
"the",
"template",
"type",
"descriptions",
"for",
"template",
"type",
"code",
"``",
"AD",
"''",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_description FROM Ref_template_types WHERE template_type_code = "AD" | Return the template type description of the template type with the code AD. | [
"SELECT",
"template_type_description",
"FROM",
"Ref_template_types",
"WHERE",
"template_type_code",
"=",
"``",
"AD",
"''"
] | [
"select",
"template_type_description",
"from",
"ref_template_types",
"where",
"template_type_code",
"=",
"value"
] | [
"Return",
"the",
"template",
"type",
"description",
"of",
"the",
"template",
"type",
"with",
"the",
"code",
"AD",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code FROM Ref_template_types WHERE template_type_description = "Book" | What is the template type code for template type description "Book". | [
"SELECT",
"template_type_code",
"FROM",
"Ref_template_types",
"WHERE",
"template_type_description",
"=",
"``",
"Book",
"''"
] | [
"select",
"template_type_code",
"from",
"ref_template_types",
"where",
"template_type_description",
"=",
"value"
] | [
"What",
"is",
"the",
"template",
"type",
"code",
"for",
"template",
"type",
"description",
"``",
"Book",
"''",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT template_type_code FROM Ref_template_types WHERE template_type_description = "Book" | Return the type code of the template type with the description "Book". | [
"SELECT",
"template_type_code",
"FROM",
"Ref_template_types",
"WHERE",
"template_type_description",
"=",
"``",
"Book",
"''"
] | [
"select",
"template_type_code",
"from",
"ref_template_types",
"where",
"template_type_description",
"=",
"value"
] | [
"Return",
"the",
"type",
"code",
"of",
"the",
"template",
"type",
"with",
"the",
"description",
"``",
"Book",
"''",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID | What are the distinct template type descriptions for the templates ever used by any document? | [
"SELECT",
"DISTINCT",
"T1.template_type_description",
"FROM",
"Ref_template_types",
"AS",
"T1",
"JOIN",
"Templates",
"AS",
"T2",
"ON",
"T1.template_type_code",
"=",
"T2.template_type_code",
"JOIN",
"Documents",
"AS",
"T3",
"ON",
"T2.Template_ID",
"=",
"T3.template_ID"
] | [
"select",
"distinct",
"t1",
".",
"template_type_description",
"from",
"ref_template_types",
"as",
"t1",
"join",
"templates",
"as",
"t2",
"on",
"t1",
".",
"template_type_code",
"=",
"t2",
".",
"template_type_code",
"join",
"documents",
"as",
"t3",
"on",
"t2",
"."... | [
"What",
"are",
"the",
"distinct",
"template",
"type",
"descriptions",
"for",
"the",
"templates",
"ever",
"used",
"by",
"any",
"document",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID | Return the different descriptions for templates that have been used in a document. | [
"SELECT",
"DISTINCT",
"T1.template_type_description",
"FROM",
"Ref_template_types",
"AS",
"T1",
"JOIN",
"Templates",
"AS",
"T2",
"ON",
"T1.template_type_code",
"=",
"T2.template_type_code",
"JOIN",
"Documents",
"AS",
"T3",
"ON",
"T2.Template_ID",
"=",
"T3.template_ID"
] | [
"select",
"distinct",
"t1",
".",
"template_type_description",
"from",
"ref_template_types",
"as",
"t1",
"join",
"templates",
"as",
"t2",
"on",
"t1",
".",
"template_type_code",
"=",
"t2",
".",
"template_type_code",
"join",
"documents",
"as",
"t3",
"on",
"t2",
"."... | [
"Return",
"the",
"different",
"descriptions",
"for",
"templates",
"that",
"have",
"been",
"used",
"in",
"a",
"document",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = "Presentation" | What are the template ids with template type description "Presentation". | [
"SELECT",
"T2.template_id",
"FROM",
"Ref_template_types",
"AS",
"T1",
"JOIN",
"Templates",
"AS",
"T2",
"ON",
"T1.template_type_code",
"=",
"T2.template_type_code",
"WHERE",
"T1.template_type_description",
"=",
"``",
"Presentation",
"''"
] | [
"select",
"t2",
".",
"template_id",
"from",
"ref_template_types",
"as",
"t1",
"join",
"templates",
"as",
"t2",
"on",
"t1",
".",
"template_type_code",
"=",
"t2",
".",
"template_type_code",
"where",
"t1",
".",
"template_type_description",
"=",
"value"
] | [
"What",
"are",
"the",
"template",
"ids",
"with",
"template",
"type",
"description",
"``",
"Presentation",
"''",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = "Presentation" | Return the ids corresponding to templates with the description 'Presentation'. | [
"SELECT",
"T2.template_id",
"FROM",
"Ref_template_types",
"AS",
"T1",
"JOIN",
"Templates",
"AS",
"T2",
"ON",
"T1.template_type_code",
"=",
"T2.template_type_code",
"WHERE",
"T1.template_type_description",
"=",
"``",
"Presentation",
"''"
] | [
"select",
"t2",
".",
"template_id",
"from",
"ref_template_types",
"as",
"t1",
"join",
"templates",
"as",
"t2",
"on",
"t1",
".",
"template_type_code",
"=",
"t2",
".",
"template_type_code",
"where",
"t1",
".",
"template_type_description",
"=",
"value"
] | [
"Return",
"the",
"ids",
"corresponding",
"to",
"templates",
"with",
"the",
"description",
"'Presentation",
"'",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(*) FROM Paragraphs | How many paragraphs in total? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Paragraphs"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"paragraphs"
] | [
"How",
"many",
"paragraphs",
"in",
"total",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(*) FROM Paragraphs | Count the number of paragraphs. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Paragraphs"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"paragraphs"
] | [
"Count",
"the",
"number",
"of",
"paragraphs",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show' | How many paragraphs for the document with name 'Summer Show'? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Paragraphs",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.document_ID",
"=",
"T2.document_ID",
"WHERE",
"T2.document_name",
"=",
"'Summer",
"Show",
"'"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"paragraphs",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"document_id",
"=",
"t2",
".",
"document_id",
"where",
"t2",
".",
"document_name",
"=",
"value"
] | [
"How",
"many",
"paragraphs",
"for",
"the",
"document",
"with",
"name",
"'Summer",
"Show",
"'",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show' | Count the number of paragraphs in the document named 'Summer Show'. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Paragraphs",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.document_ID",
"=",
"T2.document_ID",
"WHERE",
"T2.document_name",
"=",
"'Summer",
"Show",
"'"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"paragraphs",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"document_id",
"=",
"t2",
".",
"document_id",
"where",
"t2",
".",
"document_name",
"=",
"value"
] | [
"Count",
"the",
"number",
"of",
"paragraphs",
"in",
"the",
"document",
"named",
"'Summer",
"Show",
"'",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | select other_details from paragraphs where paragraph_text like 'korea' | Show paragraph details for paragraph with text 'Korea ' . | [
"select",
"other_details",
"from",
"paragraphs",
"where",
"paragraph_text",
"like",
"\"korea\""
] | [
"select",
"other_details",
"from",
"paragraphs",
"where",
"paragraph_text",
"like",
"value"
] | [
"Show",
"paragraph",
"details",
"for",
"paragraph",
"with",
"text",
"'Korea",
"'",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | select other_details from paragraphs where paragraph_text like 'korea' | What are the details for the paragraph that includes the text 'Korea ' ? | [
"select",
"other_details",
"from",
"paragraphs",
"where",
"paragraph_text",
"like",
"\"korea\""
] | [
"select",
"other_details",
"from",
"paragraphs",
"where",
"paragraph_text",
"like",
"value"
] | [
"What",
"are",
"the",
"details",
"for",
"the",
"paragraph",
"that",
"includes",
"the",
"text",
"'Korea",
"'",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY' | Show all paragraph ids and texts for the document with name 'Welcome to NY'. | [
"SELECT",
"T1.paragraph_id",
",",
"T1.paragraph_text",
"FROM",
"Paragraphs",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.document_id",
"=",
"T2.document_id",
"WHERE",
"T2.Document_Name",
"=",
"'Welcome",
"to",
"NY",
"'"
] | [
"select",
"t1",
".",
"paragraph_id",
",",
"t1",
".",
"paragraph_text",
"from",
"paragraphs",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"document_id",
"=",
"t2",
".",
"document_id",
"where",
"t2",
".",
"document_name",
"=",
"value"
] | [
"Show",
"all",
"paragraph",
"ids",
"and",
"texts",
"for",
"the",
"document",
"with",
"name",
"'Welcome",
"to",
"NY",
"'",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY' | What are the ids and texts of paragraphs in the document titled 'Welcome to NY'? | [
"SELECT",
"T1.paragraph_id",
",",
"T1.paragraph_text",
"FROM",
"Paragraphs",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.document_id",
"=",
"T2.document_id",
"WHERE",
"T2.Document_Name",
"=",
"'Welcome",
"to",
"NY",
"'"
] | [
"select",
"t1",
".",
"paragraph_id",
",",
"t1",
".",
"paragraph_text",
"from",
"paragraphs",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"document_id",
"=",
"t2",
".",
"document_id",
"where",
"t2",
".",
"document_name",
"=",
"value"
] | [
"What",
"are",
"the",
"ids",
"and",
"texts",
"of",
"paragraphs",
"in",
"the",
"document",
"titled",
"'Welcome",
"to",
"NY",
"'",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = "Customer reviews" | Show all paragraph texts for the document "Customer reviews". | [
"SELECT",
"T1.paragraph_text",
"FROM",
"Paragraphs",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.document_id",
"=",
"T2.document_id",
"WHERE",
"T2.document_name",
"=",
"``",
"Customer",
"reviews",
"''"
] | [
"select",
"t1",
".",
"paragraph_text",
"from",
"paragraphs",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"document_id",
"=",
"t2",
".",
"document_id",
"where",
"t2",
".",
"document_name",
"=",
"value"
] | [
"Show",
"all",
"paragraph",
"texts",
"for",
"the",
"document",
"``",
"Customer",
"reviews",
"''",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = "Customer reviews" | What are the paragraph texts for the document with the name 'Customer reviews'? | [
"SELECT",
"T1.paragraph_text",
"FROM",
"Paragraphs",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.document_id",
"=",
"T2.document_id",
"WHERE",
"T2.document_name",
"=",
"``",
"Customer",
"reviews",
"''"
] | [
"select",
"t1",
".",
"paragraph_text",
"from",
"paragraphs",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"document_id",
"=",
"t2",
".",
"document_id",
"where",
"t2",
".",
"document_name",
"=",
"value"
] | [
"What",
"are",
"the",
"paragraph",
"texts",
"for",
"the",
"document",
"with",
"the",
"name",
"'Customer",
"reviews",
"'",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id | Show all document ids and the number of paragraphs in each document. Order by document id. | [
"SELECT",
"document_id",
",",
"count",
"(",
"*",
")",
"FROM",
"Paragraphs",
"GROUP",
"BY",
"document_id",
"ORDER",
"BY",
"document_id"
] | [
"select",
"document_id",
",",
"count",
"(",
"*",
")",
"from",
"paragraphs",
"group",
"by",
"document_id",
"order",
"by",
"document_id"
] | [
"Show",
"all",
"document",
"ids",
"and",
"the",
"number",
"of",
"paragraphs",
"in",
"each",
"document",
".",
"Order",
"by",
"document",
"id",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id | Return the different document ids along with the number of paragraphs corresponding to each, ordered by id. | [
"SELECT",
"document_id",
",",
"count",
"(",
"*",
")",
"FROM",
"Paragraphs",
"GROUP",
"BY",
"document_id",
"ORDER",
"BY",
"document_id"
] | [
"select",
"document_id",
",",
"count",
"(",
"*",
")",
"from",
"paragraphs",
"group",
"by",
"document_id",
"order",
"by",
"document_id"
] | [
"Return",
"the",
"different",
"document",
"ids",
"along",
"with",
"the",
"number",
"of",
"paragraphs",
"corresponding",
"to",
"each",
",",
"ordered",
"by",
"id",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id | Show all document ids, names and the number of paragraphs in each document. | [
"SELECT",
"T1.document_id",
",",
"T2.document_name",
",",
"count",
"(",
"*",
")",
"FROM",
"Paragraphs",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.document_id",
"=",
"T2.document_id",
"GROUP",
"BY",
"T1.document_id"
] | [
"select",
"t1",
".",
"document_id",
",",
"t2",
".",
"document_name",
",",
"count",
"(",
"*",
")",
"from",
"paragraphs",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"document_id",
"=",
"t2",
".",
"document_id",
"group",
"by",
"t1",
"."... | [
"Show",
"all",
"document",
"ids",
",",
"names",
"and",
"the",
"number",
"of",
"paragraphs",
"in",
"each",
"document",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id | What are the ids and names of each document, as well as the number of paragraphs in each? | [
"SELECT",
"T1.document_id",
",",
"T2.document_name",
",",
"count",
"(",
"*",
")",
"FROM",
"Paragraphs",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.document_id",
"=",
"T2.document_id",
"GROUP",
"BY",
"T1.document_id"
] | [
"select",
"t1",
".",
"document_id",
",",
"t2",
".",
"document_name",
",",
"count",
"(",
"*",
")",
"from",
"paragraphs",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"document_id",
"=",
"t2",
".",
"document_id",
"group",
"by",
"t1",
"."... | [
"What",
"are",
"the",
"ids",
"and",
"names",
"of",
"each",
"document",
",",
"as",
"well",
"as",
"the",
"number",
"of",
"paragraphs",
"in",
"each",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2 | List all document ids with at least two paragraphs. | [
"SELECT",
"document_id",
"FROM",
"Paragraphs",
"GROUP",
"BY",
"document_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"document_id",
"from",
"paragraphs",
"group",
"by",
"document_id",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"List",
"all",
"document",
"ids",
"with",
"at",
"least",
"two",
"paragraphs",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2 | What are the ids of documents that have 2 or more paragraphs? | [
"SELECT",
"document_id",
"FROM",
"Paragraphs",
"GROUP",
"BY",
"document_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"document_id",
"from",
"paragraphs",
"group",
"by",
"document_id",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"What",
"are",
"the",
"ids",
"of",
"documents",
"that",
"have",
"2",
"or",
"more",
"paragraphs",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1 | What is the document id and name with greatest number of paragraphs? | [
"SELECT",
"T1.document_id",
",",
"T2.document_name",
"FROM",
"Paragraphs",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.document_id",
"=",
"T2.document_id",
"GROUP",
"BY",
"T1.document_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"document_id",
",",
"t2",
".",
"document_name",
"from",
"paragraphs",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"document_id",
"=",
"t2",
".",
"document_id",
"group",
"by",
"t1",
".",
"document_id",
"order",
"by",
... | [
"What",
"is",
"the",
"document",
"id",
"and",
"name",
"with",
"greatest",
"number",
"of",
"paragraphs",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1 | Return the id and name of the document with the most paragraphs. | [
"SELECT",
"T1.document_id",
",",
"T2.document_name",
"FROM",
"Paragraphs",
"AS",
"T1",
"JOIN",
"Documents",
"AS",
"T2",
"ON",
"T1.document_id",
"=",
"T2.document_id",
"GROUP",
"BY",
"T1.document_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"document_id",
",",
"t2",
".",
"document_name",
"from",
"paragraphs",
"as",
"t1",
"join",
"documents",
"as",
"t2",
"on",
"t1",
".",
"document_id",
"=",
"t2",
".",
"document_id",
"group",
"by",
"t1",
".",
"document_id",
"order",
"by",
... | [
"Return",
"the",
"id",
"and",
"name",
"of",
"the",
"document",
"with",
"the",
"most",
"paragraphs",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1 | What is the document id with least number of paragraphs? | [
"SELECT",
"document_id",
"FROM",
"Paragraphs",
"GROUP",
"BY",
"document_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"1"
] | [
"select",
"document_id",
"from",
"paragraphs",
"group",
"by",
"document_id",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
] | [
"What",
"is",
"the",
"document",
"id",
"with",
"least",
"number",
"of",
"paragraphs",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1 | Return the id of the document with the fewest paragraphs. | [
"SELECT",
"document_id",
"FROM",
"Paragraphs",
"GROUP",
"BY",
"document_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"1"
] | [
"select",
"document_id",
"from",
"paragraphs",
"group",
"by",
"document_id",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
] | [
"Return",
"the",
"id",
"of",
"the",
"document",
"with",
"the",
"fewest",
"paragraphs",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2 | What is the document id with 1 to 2 paragraphs? | [
"SELECT",
"document_id",
"FROM",
"Paragraphs",
"GROUP",
"BY",
"document_id",
"HAVING",
"count",
"(",
"*",
")",
"BETWEEN",
"1",
"AND",
"2"
] | [
"select",
"document_id",
"from",
"paragraphs",
"group",
"by",
"document_id",
"having",
"count",
"(",
"*",
")",
"between",
"value",
"and",
"value"
] | [
"What",
"is",
"the",
"document",
"id",
"with",
"1",
"to",
"2",
"paragraphs",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2 | Give the ids of documents that have between one and two paragraphs. | [
"SELECT",
"document_id",
"FROM",
"Paragraphs",
"GROUP",
"BY",
"document_id",
"HAVING",
"count",
"(",
"*",
")",
"BETWEEN",
"1",
"AND",
"2"
] | [
"select",
"document_id",
"from",
"paragraphs",
"group",
"by",
"document_id",
"having",
"count",
"(",
"*",
")",
"between",
"value",
"and",
"value"
] | [
"Give",
"the",
"ids",
"of",
"documents",
"that",
"have",
"between",
"one",
"and",
"two",
"paragraphs",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' | Show the document id with paragraph text 'Brazil' and 'Ireland'. | [
"SELECT",
"document_id",
"FROM",
"Paragraphs",
"WHERE",
"paragraph_text",
"=",
"'Brazil",
"'",
"INTERSECT",
"SELECT",
"document_id",
"FROM",
"Paragraphs",
"WHERE",
"paragraph_text",
"=",
"'Ireland",
"'"
] | [
"select",
"document_id",
"from",
"paragraphs",
"where",
"paragraph_text",
"=",
"value",
"intersect",
"select",
"document_id",
"from",
"paragraphs",
"where",
"paragraph_text",
"=",
"value"
] | [
"Show",
"the",
"document",
"id",
"with",
"paragraph",
"text",
"'Brazil",
"'",
"and",
"'Ireland",
"'",
"."
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
cre_Doc_Template_Mgt | SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' | What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'? | [
"SELECT",
"document_id",
"FROM",
"Paragraphs",
"WHERE",
"paragraph_text",
"=",
"'Brazil",
"'",
"INTERSECT",
"SELECT",
"document_id",
"FROM",
"Paragraphs",
"WHERE",
"paragraph_text",
"=",
"'Ireland",
"'"
] | [
"select",
"document_id",
"from",
"paragraphs",
"where",
"paragraph_text",
"=",
"value",
"intersect",
"select",
"document_id",
"from",
"paragraphs",
"where",
"paragraph_text",
"=",
"value"
] | [
"What",
"are",
"the",
"ids",
"of",
"documents",
"that",
"contain",
"the",
"paragraph",
"text",
"'Brazil",
"'",
"and",
"'Ireland",
"'",
"?"
] | CREATE TABLE Ref_Template_Types (
Template_Type_Code TEXT PRIMARY KEY,
Template_Type_Description TEXT
);
CREATE TABLE Templates (
Template_ID NUMBER PRIMARY KEY,
Version_Number NUMBER,
Template_Type_Code TEXT,
Date_Effective_From TIME,
Date_Effective_To TIME,
Template_Details TEXT,
FOREIGN KEY (Templ... |
course_teach | SELECT count(*) FROM teacher | How many teachers are there? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"teacher"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"teacher"
] | [
"How",
"many",
"teachers",
"are",
"there",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT count(*) FROM teacher | What is the total count of teachers? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"teacher"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"teacher"
] | [
"What",
"is",
"the",
"total",
"count",
"of",
"teachers",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Name FROM teacher ORDER BY Age ASC | List the names of teachers in ascending order of age. | [
"SELECT",
"Name",
"FROM",
"teacher",
"ORDER",
"BY",
"Age",
"ASC"
] | [
"select",
"name",
"from",
"teacher",
"order",
"by",
"age",
"asc"
] | [
"List",
"the",
"names",
"of",
"teachers",
"in",
"ascending",
"order",
"of",
"age",
"."
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Name FROM teacher ORDER BY Age ASC | What are the names of the teachers ordered by ascending age? | [
"SELECT",
"Name",
"FROM",
"teacher",
"ORDER",
"BY",
"Age",
"ASC"
] | [
"select",
"name",
"from",
"teacher",
"order",
"by",
"age",
"asc"
] | [
"What",
"are",
"the",
"names",
"of",
"the",
"teachers",
"ordered",
"by",
"ascending",
"age",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Age , Hometown FROM teacher | What are the age and hometown of teachers? | [
"SELECT",
"Age",
",",
"Hometown",
"FROM",
"teacher"
] | [
"select",
"age",
",",
"hometown",
"from",
"teacher"
] | [
"What",
"are",
"the",
"age",
"and",
"hometown",
"of",
"teachers",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Age , Hometown FROM teacher | What is the age and hometown of every teacher? | [
"SELECT",
"Age",
",",
"Hometown",
"FROM",
"teacher"
] | [
"select",
"age",
",",
"hometown",
"from",
"teacher"
] | [
"What",
"is",
"the",
"age",
"and",
"hometown",
"of",
"every",
"teacher",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | select name from teacher where hometown != "little lever urban district" | List the name of teachers whose hometown is not `` Little Lever Urban District '' . | [
"select",
"name",
"from",
"teacher",
"where",
"hometown",
"!=",
"\"little lever urban district\""
] | [
"select",
"name",
"from",
"teacher",
"where",
"hometown",
"!",
"=",
"value"
] | [
"List",
"the",
"name",
"of",
"teachers",
"whose",
"hometown",
"is",
"not",
"``",
"Little",
"Lever",
"Urban",
"District",
"''",
"."
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | select name from teacher where hometown != "little lever urban district" | What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ? | [
"select",
"name",
"from",
"teacher",
"where",
"hometown",
"!=",
"\"little lever urban district\""
] | [
"select",
"name",
"from",
"teacher",
"where",
"hometown",
"!",
"=",
"value"
] | [
"What",
"are",
"the",
"names",
"of",
"the",
"teachers",
"whose",
"hometown",
"is",
"not",
"``",
"Little",
"Lever",
"Urban",
"District",
"''",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Name FROM teacher WHERE Age = 32 OR Age = 33 | Show the name of teachers aged either 32 or 33? | [
"SELECT",
"Name",
"FROM",
"teacher",
"WHERE",
"Age",
"=",
"32",
"OR",
"Age",
"=",
"33"
] | [
"select",
"name",
"from",
"teacher",
"where",
"age",
"=",
"value",
"or",
"age",
"=",
"value"
] | [
"Show",
"the",
"name",
"of",
"teachers",
"aged",
"either",
"32",
"or",
"33",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Name FROM teacher WHERE Age = 32 OR Age = 33 | What are the names of the teachers who are aged either 32 or 33? | [
"SELECT",
"Name",
"FROM",
"teacher",
"WHERE",
"Age",
"=",
"32",
"OR",
"Age",
"=",
"33"
] | [
"select",
"name",
"from",
"teacher",
"where",
"age",
"=",
"value",
"or",
"age",
"=",
"value"
] | [
"What",
"are",
"the",
"names",
"of",
"the",
"teachers",
"who",
"are",
"aged",
"either",
"32",
"or",
"33",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1 | What is the hometown of the youngest teacher? | [
"SELECT",
"Hometown",
"FROM",
"teacher",
"ORDER",
"BY",
"Age",
"ASC",
"LIMIT",
"1"
] | [
"select",
"hometown",
"from",
"teacher",
"order",
"by",
"age",
"asc",
"limit",
"value"
] | [
"What",
"is",
"the",
"hometown",
"of",
"the",
"youngest",
"teacher",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1 | Where is the youngest teacher from? | [
"SELECT",
"Hometown",
"FROM",
"teacher",
"ORDER",
"BY",
"Age",
"ASC",
"LIMIT",
"1"
] | [
"select",
"hometown",
"from",
"teacher",
"order",
"by",
"age",
"asc",
"limit",
"value"
] | [
"Where",
"is",
"the",
"youngest",
"teacher",
"from",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown | Show different hometown of teachers and the number of teachers from each hometown. | [
"SELECT",
"Hometown",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"teacher",
"GROUP",
"BY",
"Hometown"
] | [
"select",
"hometown",
",",
"count",
"(",
"*",
")",
"from",
"teacher",
"group",
"by",
"hometown"
] | [
"Show",
"different",
"hometown",
"of",
"teachers",
"and",
"the",
"number",
"of",
"teachers",
"from",
"each",
"hometown",
"."
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown | For each hometown, how many teachers are there? | [
"SELECT",
"Hometown",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"teacher",
"GROUP",
"BY",
"Hometown"
] | [
"select",
"hometown",
",",
"count",
"(",
"*",
")",
"from",
"teacher",
"group",
"by",
"hometown"
] | [
"For",
"each",
"hometown",
",",
"how",
"many",
"teachers",
"are",
"there",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1 | List the most common hometown of teachers. | [
"SELECT",
"Hometown",
"FROM",
"teacher",
"GROUP",
"BY",
"Hometown",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"hometown",
"from",
"teacher",
"group",
"by",
"hometown",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"List",
"the",
"most",
"common",
"hometown",
"of",
"teachers",
"."
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1 | What is the most commmon hometowns for teachers? | [
"SELECT",
"Hometown",
"FROM",
"teacher",
"GROUP",
"BY",
"Hometown",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"hometown",
"from",
"teacher",
"group",
"by",
"hometown",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"most",
"commmon",
"hometowns",
"for",
"teachers",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2 | Show the hometowns shared by at least two teachers. | [
"SELECT",
"Hometown",
"FROM",
"teacher",
"GROUP",
"BY",
"Hometown",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"hometown",
"from",
"teacher",
"group",
"by",
"hometown",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"Show",
"the",
"hometowns",
"shared",
"by",
"at",
"least",
"two",
"teachers",
"."
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2 | What are the towns from which at least two teachers come from? | [
"SELECT",
"Hometown",
"FROM",
"teacher",
"GROUP",
"BY",
"Hometown",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"hometown",
"from",
"teacher",
"group",
"by",
"hometown",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"What",
"are",
"the",
"towns",
"from",
"which",
"at",
"least",
"two",
"teachers",
"come",
"from",
"?"
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
course_teach | SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID | Show names of teachers and the courses they are arranged to teach. | [
"SELECT",
"T3.Name",
",",
"T2.Course",
"FROM",
"course_arrange",
"AS",
"T1",
"JOIN",
"course",
"AS",
"T2",
"ON",
"T1.Course_ID",
"=",
"T2.Course_ID",
"JOIN",
"teacher",
"AS",
"T3",
"ON",
"T1.Teacher_ID",
"=",
"T3.Teacher_ID"
] | [
"select",
"t3",
".",
"name",
",",
"t2",
".",
"course",
"from",
"course_arrange",
"as",
"t1",
"join",
"course",
"as",
"t2",
"on",
"t1",
".",
"course_id",
"=",
"t2",
".",
"course_id",
"join",
"teacher",
"as",
"t3",
"on",
"t1",
".",
"teacher_id",
"=",
"... | [
"Show",
"names",
"of",
"teachers",
"and",
"the",
"courses",
"they",
"are",
"arranged",
"to",
"teach",
"."
] | CREATE TABLE course (
Course_ID NUMBER PRIMARY KEY,
Staring_Date TEXT,
Course TEXT
);
CREATE TABLE teacher (
Teacher_ID NUMBER PRIMARY KEY,
Name TEXT,
Age TEXT,
Hometown TEXT
);
CREATE TABLE course_arrange (
Course_ID NUMBER PRIMARY KEY,
Teacher_ID NUMBER,
Grade NUMBER,
FOREIGN KEY (Course_ID) R... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.