db_id
stringlengths
3
31
query
stringlengths
18
577
question
stringlengths
3
224
schema
stringlengths
177
6.14k
primary_keys
stringlengths
16
545
foreign_keys
stringlengths
16
1.48k
cre_Doc_Tracking_DB
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba"
What is the id for the employee called Ebba?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba"
Show the id of the employee named Ebba.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT employee_name FROM Employees WHERE role_code = "HR"
Show the names of all the employees with role "HR".
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT employee_name FROM Employees WHERE role_code = "HR"
Which employees have the role with code "HR"? Find their names.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT role_code , count(*) FROM Employees GROUP BY role_code
Show all role codes and the number of employees in each role.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT role_code , count(*) FROM Employees GROUP BY role_code
What is the code of each role and the number of employees in each role?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
What is the role code with the largest number of employees?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
Find the code of the role that have the most employees.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3
Show all role codes with at least 3 employees.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3
What are the roles with three or more employees? Give me the role codes.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1
Show the role code with the least employees.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1
What is the role with the smallest number of employees? Find the role codes.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT T2.role_name , T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = "Ebba"
What is the role name and role description for employee called Ebba?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT T2.role_name , T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = "Ebba"
Show the name and description of the role played by the employee named Ebba.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Editor"
Show the names of employees with role name Editor.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Editor"
Find the names of all the employees whose the role name is "Editor".
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Human Resource" OR T2.role_name = "Manager"
Show the employee ids for all employees with role name "Human Resource" or "Manager".
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Human Resource" OR T2.role_name = "Manager"
What are the employee ids of the employees whose role name is "Human Resource" or "Manager"?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT DISTINCT location_code FROM Document_locations
What are the different location codes for documents?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT DISTINCT location_code FROM Document_locations
Give me all the distinct location codes for documents.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = "Robin CV"
Show the location name for document "Robin CV".
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = "Robin CV"
What is the location name of the document "Robin CV"?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT location_code , date_in_location_from , date_in_locaton_to FROM Document_locations
Show the location code, the starting date and ending data in that location for all the documents.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT location_code , date_in_location_from , date_in_locaton_to FROM Document_locations
What are each document's location code, and starting date and ending data in that location?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT T1.date_in_location_from , T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = "Robin CV"
What is "the date in location from" and "the date in location to" for the document with name "Robin CV"?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT T1.date_in_location_from , T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = "Robin CV"
Find the starting date and ending data in location for the document named "Robin CV".
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT location_code , count(*) FROM Document_locations GROUP BY location_code
Show the location codes and the number of documents in each location.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT location_code , count(*) FROM Document_locations GROUP BY location_code
What is the code of each location and the number of documents in that location?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1
What is the location code with the most documents?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1
Find the code of the location with the largest number of documents.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3
Show the location codes with at least 3 documents.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3
What are the codes of the locations with at least three documents?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
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
Show the location name and code with the least documents.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
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
What are the name and code of the location with the smallest number of documents?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
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;
What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
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;
List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT Destruction_Authorised_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID
Show the id of each employee and the number of document destruction authorised by that employee.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT Destruction_Authorised_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID
What are the id of each employee and the number of document destruction authorised by that employee?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
Show the employee ids and the number of documents destroyed by each employee.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
What are the id of each employee and the number of document destroyed by that employee?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
Show the ids of the employees who don't authorize destruction for any document.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
Which employees do not authorize destruction for any document? Give me their employee ids.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
Show the ids of all employees who have authorized destruction.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
What are the ids of all the employees who authorize document destruction?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
Show the ids of all employees who have destroyed a document.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
What are the ids of all the employees who have destroyed documents?
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
Show the ids of all employees who don't destroy any document.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
Which employees do not destroy any document? Find their employee ids.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
Show the ids of all employees who have either destroyed a document or made an authorization to do this.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
cre_Doc_Tracking_DB
SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.
[Schema (values) (types)]: | cre_Doc_Tracking_DB | Ref_Document_Types : document_type_code (text) , document_type_name (text) , document_type_description (text) | Ref_Calendar : calendar_date (text) , day_number (text) | Ref_Locations : location_code (text) , location_name (text) , location_description (text) | Roles : role_code (text) , role_name (text) , role_description (text) | All_Documents : document_id (text) , date_stored (text) , document_type_code (text) , document_name (text) , document_description (time) , other_details (number) | Employees : employee_id (text) , role_code (text) , employee_name (text) , gender_mfu (text) , date_of_birth (time) , other_details (number) | Document_Locations : document_id (text) , location_code (text) , date_in_location_from (text) , date_in_locaton_to (text) | Documents_to_be_Destroyed : document_id (text) , destruction_authorised_by_employee_id (text) , destroyed_by_employee_id (text) , planned_destruction_date (text) , actual_destruction_date (time) , other_details (number);
[Primary Keys]: ref_document_types : document_type_code, ref_calendar : calendar_date, ref_locations : location_code, roles : role_code, all_documents : document_id, employees : employee_id, document_locations : document_id, documents_to_be_destroyed : document_id
[Foreign Keys]: all_documents : date_stored = ref_calendar : calendar_date | all_documents : document_type_code = ref_document_types : document_type_code | employees : role_code = roles : role_code | document_locations : document_id = all_documents : document_id | document_locations : date_in_locaton_to = ref_calendar : calendar_date | document_locations : date_in_location_from = ref_calendar : calendar_date | document_locations : location_code = ref_locations : location_code | documents_to_be_destroyed : document_id = all_documents : document_id | documents_to_be_destroyed : actual_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : planned_destruction_date = ref_calendar : calendar_date | documents_to_be_destroyed : destruction_authorised_by_employee_id = employees : employee_id | documents_to_be_destroyed : destroyed_by_employee_id = employees : employee_id
club_1
SELECT count(*) FROM club
How many clubs are there?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club
Count the total number of clubs.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clubname FROM club
What are the names of all clubs?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clubname FROM club
Give me the name of each club.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM student
How many students are there?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM student
Count the total number of students.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT DISTINCT fname FROM student
What are the first names of all the students?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT DISTINCT fname FROM student
Find each student's first name.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore"
Find the last names of the members of the club "Bootup Baltimore".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore"
Who are the members of the club named "Bootup Baltimore"? Give me their last names.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises"
Who are the members of the club named "Hopkins Student Enterprises"? Show the last name.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises"
Return the last name for the members of the club named "Hopkins Student Enterprises".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Tennis Club"
How many members does the club "Tennis Club" has?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Tennis Club"
Count the members of the club "Tennis Club".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Pen and Paper Gaming"
Find the number of members of club "Pen and Paper Gaming".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Pen and Paper Gaming"
How many people have membership in the club "Pen and Paper Gaming"?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Linda" AND t3.lname = "Smith"
How many clubs does "Linda Smith" belong to?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Linda" AND t3.lname = "Smith"
How many clubs does "Linda Smith" have membership for?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Tracy" AND t3.lname = "Kim"
Find the number of clubs where "Tracy Kim" is a member.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Tracy" AND t3.lname = "Kim"
For how many clubs is "Tracy Kim" a member?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.sex = "F"
Find all the female members of club "Bootup Baltimore". Show the first name and last name.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.sex = "F"
Give me the first name and last name for all the female members of the club "Bootup Baltimore".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises" AND t3.sex = "M"
Find all the male members of club "Hopkins Student Enterprises". Show the first name and last name.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises" AND t3.sex = "M"
What are the first name and last name of each male member in club "Hopkins Student Enterprises"?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.major = "600"
Find all members of "Bootup Baltimore" whose major is "600". Show the first name and last name.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.major = "600"
Which members of "Bootup Baltimore" major in "600"? Give me their first names and last names.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = "600" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1
Which club has the most members majoring in "600"?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = "600" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1
Find the club which has the largest number of members majoring in "600".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = "F" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1
Find the name of the club that has the most female students.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = "F" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1
Which club has the most female students as their members? Give me the name of the club.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clubdesc FROM club WHERE clubname = "Tennis Club"
What is the description of the club named "Tennis Club"?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clubdesc FROM club WHERE clubname = "Tennis Club"
Find the description of the club called "Tennis Club".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming"
Find the description of the club "Pen and Paper Gaming".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming"
What is the description of the club "Pen and Paper Gaming"?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clublocation FROM club WHERE clubname = "Tennis Club"
What is the location of the club named "Tennis Club"?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clublocation FROM club WHERE clubname = "Tennis Club"
Where us the club named "Tennis Club" located?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming"
Find the location of the club "Pen and Paper Gaming".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming"
Where is the club "Pen and Paper Gaming" located?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises"
Where is the club "Hopkins Student Enterprises" located?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises"
Tell me the location of the club "Hopkins Student Enterprises".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clubname FROM club WHERE clublocation = "AKW"
Find the name of all the clubs at "AKW".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT clubname FROM club WHERE clublocation = "AKW"
Which clubs are located at "AKW"? Return the club names.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club WHERE clublocation = "HHH"
How many clubs are located at "HHH"?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(*) FROM club WHERE clublocation = "HHH"
Count the number of clubs located at "HHH".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t2.position = "President"
What are the first and last name of the president of the club "Bootup Baltimore"?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t2.position = "President"
Who is the president of the club "Bootup Baltimore"? Give me the first and last name.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises" AND t2.position = "CTO"
Who is the "CTO" of club "Hopkins Student Enterprises"? Show the first name and last name.
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises" AND t2.position = "CTO"
Find the first name and last name for the "CTO" of the club "Hopkins Student Enterprises"?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = "Bootup Baltimore"
How many different roles are there in the club "Bootup Baltimore"?
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid
club_1
SELECT count(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = "Bootup Baltimore"
Count the number of different positions in the club "Bootup Baltimore".
[Schema (values) (types)]: | club_1 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Club : clubid (text) , clubname (number) , clubdesc (text) , clublocation (text) | Member_of_club : stuid (text) , clubid (number) , position (text);
[Primary Keys]: student : stuid, club : clubid
[Foreign Keys]: member_of_club : clubid = club : clubid | member_of_club : stuid = student : stuid