Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the manager name and district of the shop that sells the largest number of products?</question>
[SQL]:

Output: <SQL_QUERY>SELECT manager_name ,  district FROM shop ORDER BY number_products DESC LIMIT 1</SQL_QUERY>

Question: SELECT manager_name ,  district FROM shop ORDER BY number_products DESC LIMIT 1

Question: What are the manager name and district of the shop that sells the largest number of products?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>find the minimum and maximum number of products of all stores.</question>
[SQL]:

Output: <SQL_QUERY>SELECT min(Number_products) ,  max(Number_products) FROM shop</SQL_QUERY>

Question: SELECT min(Number_products) ,  max(Number_products) FROM shop

Question: find the minimum and maximum number of products of all stores.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the minimum and maximum number of products across all the shops?</question>
[SQL]:

Output: <SQL_QUERY>SELECT min(Number_products) ,  max(Number_products) FROM shop</SQL_QUERY>

Question: SELECT min(Number_products) ,  max(Number_products) FROM shop

Question: What are the minimum and maximum number of products across all the shops?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the name, location and district of all shops in descending order of number of products.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  LOCATION ,  district FROM shop ORDER BY number_products DESC</SQL_QUERY>

Question: SELECT name ,  LOCATION ,  district FROM shop ORDER BY number_products DESC

Question: Return the name, location and district of all shops in descending order of number of products.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Sort all the shops by number products in descending order, and return the name, location and district of each shop.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  LOCATION ,  district FROM shop ORDER BY number_products DESC</SQL_QUERY>

Question: SELECT name ,  LOCATION ,  district FROM shop ORDER BY number_products DESC

Question: Sort all the shops by number products in descending order, and return the name, location and district of each shop.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the names of stores whose number products is more than the average number of products.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM shop WHERE number_products  >  (SELECT avg(number_products) FROM shop)</SQL_QUERY>

Question: SELECT name FROM shop WHERE number_products  >  (SELECT avg(number_products) FROM shop)

Question: Find the names of stores whose number products is more than the average number of products.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which shops' number products is above the average? Give me the shop names.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM shop WHERE number_products  >  (SELECT avg(number_products) FROM shop)</SQL_QUERY>

Question: SELECT name FROM shop WHERE number_products  >  (SELECT avg(number_products) FROM shop)

Question: Which shops' number products is above the average? Give me the shop names.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>find the name of employee who was awarded the most times in the evaluation.</question>
[SQL]:

Output: <SQL_QUERY>SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1

Question: find the name of employee who was awarded the most times in the evaluation.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which employee received the most awards in evaluations? Give me the employee name.</question>
[SQL]:

Output: <SQL_QUERY>SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1

Question: Which employee received the most awards in evaluations? Give me the employee name.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name of the employee who got the highest one time bonus.</question>
[SQL]:

Output: <SQL_QUERY>SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1</SQL_QUERY>

Question: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1

Question: Find the name of the employee who got the highest one time bonus.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which employee received the biggest bonus? Give me the employee name.</question>
[SQL]:

Output: <SQL_QUERY>SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1</SQL_QUERY>

Question: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1

Question: Which employee received the biggest bonus? Give me the employee name.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the names of employees who never won any award in the evaluation.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)</SQL_QUERY>

Question: SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)

Question: Find the names of employees who never won any award in the evaluation.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the employees who never received any evaluation?</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)</SQL_QUERY>

Question: SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)

Question: What are the names of the employees who never received any evaluation?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of the shop that is hiring the largest number of employees?</question>
[SQL]:

Output: <SQL_QUERY>SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1

Question: What is the name of the shop that is hiring the largest number of employees?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which shop has the most employees? Give me the shop name.</question>
[SQL]:

Output: <SQL_QUERY>SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1

Question: Which shop has the most employees? Give me the shop name.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name of the shops that do not hire any employee.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)</SQL_QUERY>

Question: SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)

Question: Find the name of the shops that do not hire any employee.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which shops run with no employees? Find the shop names</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)</SQL_QUERY>

Question: SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)

Question: Which shops run with no employees? Find the shop names


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of employees hired in each shop; show the shop name as well.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) ,  t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t2.name</SQL_QUERY>

Question: SELECT count(*) ,  t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t2.name

Question: Find the number of employees hired in each shop; show the shop name as well.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>For each shop, return the number of employees working there and the name of the shop.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) ,  t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t2.name</SQL_QUERY>

Question: SELECT count(*) ,  t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t2.name

Question: For each shop, return the number of employees working there and the name of the shop.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is total bonus given in all evaluations?</question>
[SQL]:

Output: <SQL_QUERY>SELECT sum(bonus) FROM evaluation</SQL_QUERY>

Question: SELECT sum(bonus) FROM evaluation

Question: What is total bonus given in all evaluations?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the total amount of bonus given in all the evaluations.</question>
[SQL]:

Output: <SQL_QUERY>SELECT sum(bonus) FROM evaluation</SQL_QUERY>

Question: SELECT sum(bonus) FROM evaluation

Question: Find the total amount of bonus given in all the evaluations.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give me all the information about hiring.</question>
[SQL]:

Output: <SQL_QUERY>SELECT * FROM hiring</SQL_QUERY>

Question: SELECT * FROM hiring

Question: Give me all the information about hiring.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is all the information about hiring?</question>
[SQL]:

Output: <SQL_QUERY>SELECT * FROM hiring</SQL_QUERY>

Question: SELECT * FROM hiring

Question: What is all the information about hiring?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which district has both stores with less than 3000 products and stores with more than 10000 products?</question>
[SQL]:

Output: <SQL_QUERY>SELECT district FROM shop WHERE Number_products  <  3000 INTERSECT SELECT district FROM shop WHERE Number_products  >  10000</SQL_QUERY>

Question: SELECT district FROM shop WHERE Number_products  <  3000 INTERSECT SELECT district FROM shop WHERE Number_products  >  10000

Question: Which district has both stores with less than 3000 products and stores with more than 10000 products?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.</question>
[SQL]:

Output: <SQL_QUERY>SELECT district FROM shop WHERE Number_products  <  3000 INTERSECT SELECT district FROM shop WHERE Number_products  >  10000</SQL_QUERY>

Question: SELECT district FROM shop WHERE Number_products  <  3000 INTERSECT SELECT district FROM shop WHERE Number_products  >  10000

Question: Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many different store locations are there?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(DISTINCT LOCATION) FROM shop</SQL_QUERY>

Question: SELECT count(DISTINCT LOCATION) FROM shop

Question: How many different store locations are there?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | employee_hire_evaluation |  employee : employee_id (text) , name (number) , age (text) , city (number) | shop : shop_id (text) , name (number) , location (text) , district (number) , number_products (text) , manager_name (number) | hiring : shop_id (text) , employee_id (number) , start_from (text) , is_full_time (number) | evaluation : employee_id (text) , year_awarded (number) , bonus (text);</schema>"
<primary_keys>[Primary Keys]: employee : employee_id, shop : shop_id, hiring : employee_id, evaluation : employee_id</primary_keys>"
<foreign_keys>[Foreign Keys]: hiring : employee_id = employee : employee_id | hiring : shop_id = shop : shop_id | evaluation : employee_id = employee : employee_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of distinct store locations.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(DISTINCT LOCATION) FROM shop</SQL_QUERY>

Question: SELECT count(DISTINCT LOCATION) FROM shop

Question: Count the number of distinct store locations.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many documents do we have?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Documents</SQL_QUERY>

Question: SELECT count(*) FROM Documents

Question: How many documents do we have?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of documents.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Documents</SQL_QUERY>

Question: SELECT count(*) FROM Documents

Question: Count the number of documents.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List document IDs, document names, and document descriptions for all documents.</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id ,  document_name ,  document_description FROM Documents</SQL_QUERY>

Question: SELECT document_id ,  document_name ,  document_description FROM Documents

Question: List document IDs, document names, and document descriptions for all documents.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids, names, and descriptions for all documents?</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id ,  document_name ,  document_description FROM Documents</SQL_QUERY>

Question: SELECT document_id ,  document_name ,  document_description FROM Documents

Question: What are the ids, names, and descriptions for all documents?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the document name and template id for document with description with the letter 'w' in it?</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_name ,  template_id FROM Documents WHERE Document_Description LIKE "%w%"</SQL_QUERY>

Question: SELECT document_name ,  template_id FROM Documents WHERE Document_Description LIKE "%w%"

Question: What is the document name and template id for document with description with the letter 'w' in it?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the names and template ids for documents that contain the letter w in their description.</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_name ,  template_id FROM Documents WHERE Document_Description LIKE "%w%"</SQL_QUERY>

Question: SELECT document_name ,  template_id FROM Documents WHERE Document_Description LIKE "%w%"

Question: Return the names and template ids for documents that contain the letter w in their description.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the document id, template id and description for document named "Robbin CV"?</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id ,  template_id ,  Document_Description FROM Documents WHERE document_name  =  "Robbin CV"</SQL_QUERY>

Question: SELECT document_id ,  template_id ,  Document_Description FROM Documents WHERE document_name  =  "Robbin CV"

Question: What is the document id, template id and description for document named "Robbin CV"?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the document id, template id, and description for the document with the name Robbin CV.</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id ,  template_id ,  Document_Description FROM Documents WHERE document_name  =  "Robbin CV"</SQL_QUERY>

Question: SELECT document_id ,  template_id ,  Document_Description FROM Documents WHERE document_name  =  "Robbin CV"

Question: Return the document id, template id, and description for the document with the name Robbin CV.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many different templates do all document use?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(DISTINCT template_id) FROM Documents</SQL_QUERY>

Question: SELECT count(DISTINCT template_id) FROM Documents

Question: How many different templates do all document use?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of different templates used for documents.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(DISTINCT template_id) FROM Documents</SQL_QUERY>

Question: SELECT count(DISTINCT template_id) FROM Documents

Question: Count the number of different templates used for documents.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many documents are using the template with type code 'PPT'?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID WHERE T2.Template_Type_Code  =  'PPT'</SQL_QUERY>

Question: SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID WHERE T2.Template_Type_Code  =  'PPT'

Question: How many documents are using the template with type code 'PPT'?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of documents that use the PPT template type.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID WHERE T2.Template_Type_Code  =  'PPT'</SQL_QUERY>

Question: SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID WHERE T2.Template_Type_Code  =  'PPT'

Question: Count the number of documents that use the PPT template type.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all template ids and number of documents using each template.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_id ,  count(*) FROM Documents GROUP BY template_id</SQL_QUERY>

Question: SELECT template_id ,  count(*) FROM Documents GROUP BY template_id

Question: Show all template ids and number of documents using each template.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are all different template ids used for documents, and how many times were each of them used?</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_id ,  count(*) FROM Documents GROUP BY template_id</SQL_QUERY>

Question: SELECT template_id ,  count(*) FROM Documents GROUP BY template_id

Question: What are all different template ids used for documents, and how many times were each of them used?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the id and type code for the template used by the most documents?</question>
[SQL]:

Output: <SQL_QUERY>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</SQL_QUERY>

Question: 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

Question: What is the id and type code for the template used by the most documents?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the id and type code of the template that is used for the greatest number of documents.</question>
[SQL]:

Output: <SQL_QUERY>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</SQL_QUERY>

Question: 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

Question: Return the id and type code of the template that is used for the greatest number of documents.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show ids for all templates that are used by more than one document.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_id FROM Documents GROUP BY template_id HAVING count(*)  >  1</SQL_QUERY>

Question: SELECT template_id FROM Documents GROUP BY template_id HAVING count(*)  >  1

Question: Show ids for all templates that are used by more than one document.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the template ids of any templates used in more than a single document?</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_id FROM Documents GROUP BY template_id HAVING count(*)  >  1</SQL_QUERY>

Question: SELECT template_id FROM Documents GROUP BY template_id HAVING count(*)  >  1

Question: What are the template ids of any templates used in more than a single document?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show ids for all templates not used by any document.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents</SQL_QUERY>

Question: SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents

Question: Show ids for all templates not used by any document.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids for templates that are not used in any documents?</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents</SQL_QUERY>

Question: SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents

Question: What are the ids for templates that are not used in any documents?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many templates do we have?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Templates</SQL_QUERY>

Question: SELECT count(*) FROM Templates

Question: How many templates do we have?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of templates.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Templates</SQL_QUERY>

Question: SELECT count(*) FROM Templates

Question: Count the number of templates.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show template ids, version numbers, and template type codes for all templates.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_id ,  version_number ,  template_type_code FROM Templates</SQL_QUERY>

Question: SELECT template_id ,  version_number ,  template_type_code FROM Templates

Question: Show template ids, version numbers, and template type codes for all templates.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids, version numbers, and type codes for each template?</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_id ,  version_number ,  template_type_code FROM Templates</SQL_QUERY>

Question: SELECT template_id ,  version_number ,  template_type_code FROM Templates

Question: What are the ids, version numbers, and type codes for each template?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all distinct template type codes for all templates.</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT template_type_code FROM Templates</SQL_QUERY>

Question: SELECT DISTINCT template_type_code FROM Templates

Question: Show all distinct template type codes for all templates.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different template type codes?</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT template_type_code FROM Templates</SQL_QUERY>

Question: SELECT DISTINCT template_type_code FROM Templates

Question: What are the different template type codes?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids of templates with template type code PP or PPT?</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_id FROM Templates WHERE template_type_code  =  "PP" OR template_type_code  =  "PPT"</SQL_QUERY>

Question: SELECT template_id FROM Templates WHERE template_type_code  =  "PP" OR template_type_code  =  "PPT"

Question: What are the ids of templates with template type code PP or PPT?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the ids of templates that have the code PP or PPT.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_id FROM Templates WHERE template_type_code  =  "PP" OR template_type_code  =  "PPT"</SQL_QUERY>

Question: SELECT template_id FROM Templates WHERE template_type_code  =  "PP" OR template_type_code  =  "PPT"

Question: Return the ids of templates that have the code PP or PPT.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many templates have template type code CV?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Templates WHERE template_type_code  =  "CV"</SQL_QUERY>

Question: SELECT count(*) FROM Templates WHERE template_type_code  =  "CV"

Question: How many templates have template type code CV?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of templates of the type CV.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Templates WHERE template_type_code  =  "CV"</SQL_QUERY>

Question: SELECT count(*) FROM Templates WHERE template_type_code  =  "CV"

Question: Count the number of templates of the type CV.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the version number and template type code for the template with version number later than 5?</question>
[SQL]:

Output: <SQL_QUERY>SELECT version_number ,  template_type_code FROM Templates WHERE version_number  >  5</SQL_QUERY>

Question: SELECT version_number ,  template_type_code FROM Templates WHERE version_number  >  5

Question: What is the version number and template type code for the template with version number later than 5?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the version numbers and template type codes of templates with a version number greater than 5.</question>
[SQL]:

Output: <SQL_QUERY>SELECT version_number ,  template_type_code FROM Templates WHERE version_number  >  5</SQL_QUERY>

Question: SELECT version_number ,  template_type_code FROM Templates WHERE version_number  >  5

Question: Return the version numbers and template type codes of templates with a version number greater than 5.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all template type codes and number of templates for each.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code ,  count(*) FROM Templates GROUP BY template_type_code</SQL_QUERY>

Question: SELECT template_type_code ,  count(*) FROM Templates GROUP BY template_type_code

Question: Show all template type codes and number of templates for each.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different template type codes, and how many templates correspond to each?</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code ,  count(*) FROM Templates GROUP BY template_type_code</SQL_QUERY>

Question: SELECT template_type_code ,  count(*) FROM Templates GROUP BY template_type_code

Question: What are the different template type codes, and how many templates correspond to each?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which template type code has most number of templates?</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1

Question: Which template type code has most number of templates?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the type code of the template type that the most templates belong to.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1

Question: Return the type code of the template type that the most templates belong to.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all template type codes with less than three templates.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*)  <  3</SQL_QUERY>

Question: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*)  <  3

Question: Show all template type codes with less than three templates.