sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the code of each location and the number of documents in that location?
SQL: SELECT location_code ,  count(*) FROM Document_locations GROUP BY location_code
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the location code with the most documents?
SQL: SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the code of the location with the largest number of documents.
SQL: SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the location codes with at least 3 documents.
SQL: SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*)  >=  3
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the codes of the locations with at least three documents?
SQL: SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*)  >=  3
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the location name and code with the least documents.
SQL: SELECT T2.location_name ,  T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code  =  T2.location_code GROUP BY T1.location_code ORDER BY count(*) ASC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the name and code of the location with the smallest number of documents?
SQL: SELECT T2.location_name ,  T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code  =  T2.location_code GROUP BY T1.location_code ORDER BY count(*) ASC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?
SQL: SELECT T2.employee_name ,  T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id;
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.
SQL: SELECT T2.employee_name ,  T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id;
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the id of each employee and the number of document destruction authorised by that employee.
SQL: SELECT Destruction_Authorised_by_Employee_ID ,  count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the id of each employee and the number of document destruction authorised by that employee?
SQL: SELECT Destruction_Authorised_by_Employee_ID ,  count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the employee ids and the number of documents destroyed by each employee.
SQL: SELECT Destroyed_by_Employee_ID ,  count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the id of each employee and the number of document destroyed by that employee?
SQL: SELECT Destroyed_by_Employee_ID ,  count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the ids of the employees who don't authorize destruction for any document.
SQL: SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Which employees do not authorize destruction for any document? Give me their employee ids.
SQL: SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the ids of all employees who have authorized destruction.
SQL: SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the ids of all the employees who authorize document destruction?
SQL: SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the ids of all employees who have destroyed a document.
SQL: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the ids of all the employees who have destroyed documents?
SQL: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the ids of all employees who don't destroy any document.
SQL: SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Which employees do not destroy any document? Find their employee ids.
SQL: SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Show the ids of all employees who have either destroyed a document or made an authorization to do this.
SQL: SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
-- Language PostgreSQL
        -- Tables: 
             -- Table: reference document types 
columns : [['document type code', 'text'], ['document type name', 'text'], ['document type description', 'text']]

 -- Table: reference calendar 
columns : [['calendar date', 'time'], ['day number', 'number']]

 -- Table: reference locations 
columns : [['location code', 'text'], ['location name', 'text'], ['location description', 'text']]

 -- Table: roles 
columns : [['role code', 'text'], ['role name', 'text'], ['role description', 'text']]

 -- Table: all documents 
columns : [['document id', 'number'], ['date stored', 'time'], ['document type code', 'text'], ['document name', 'text'], ['document description', 'text'], ['other details', 'text']]

 -- Table: employees 
columns : [['employee id', 'number'], ['role code', 'text'], ['employee name', 'text'], ['gender mfu', 'text'], ['date of birth', 'time'], ['other details', 'text']]

 -- Table: document locations 
columns : [['document id', 'number'], ['location code', 'text'], ['date in location from', 'time'], ['date in locaton to', 'time']]

 -- Table: documents to be destroyed 
columns : [['document id', 'number'], ['destruction authorised by employee id', 'number'], ['destroyed by employee id', 'number'], ['planned destruction date', 'time'], ['actual destruction date', 'time'], ['other details', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.
SQL: SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: club 
columns : [['club id', 'number'], ['club name', 'text'], ['club description', 'text'], ['club location', 'text']]

 -- Table: member of club 
columns : [['student id', 'number'], ['club id', 'number'], ['position', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many clubs are there?
SQL: SELECT count(*) FROM club
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: club 
columns : [['club id', 'number'], ['club name', 'text'], ['club description', 'text'], ['club location', 'text']]

 -- Table: member of club 
columns : [['student id', 'number'], ['club id', 'number'], ['position', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Count the total number of clubs.
SQL: SELECT count(*) FROM club
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: club 
columns : [['club id', 'number'], ['club name', 'text'], ['club description', 'text'], ['club location', 'text']]

 -- Table: member of club 
columns : [['student id', 'number'], ['club id', 'number'], ['position', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names of all clubs?
SQL: SELECT clubname FROM club
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: club 
columns : [['club id', 'number'], ['club name', 'text'], ['club description', 'text'], ['club location', 'text']]

 -- Table: member of club 
columns : [['student id', 'number'], ['club id', 'number'], ['position', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Give me the name of each club.
SQL: SELECT clubname FROM club
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: club 
columns : [['club id', 'number'], ['club name', 'text'], ['club description', 'text'], ['club location', 'text']]

 -- Table: member of club 
columns : [['student id', 'number'], ['club id', 'number'], ['position', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many students are there?
SQL: SELECT count(*) FROM student