Database schema:
CREATE TABLE Staff (
  staff_id NUMBER PRIMARY KEY,
  staff_details TEXT
);
CREATE TABLE Ref_Staff_Roles (
  staff_role_code TEXT PRIMARY KEY,
  staff_role_description TEXT
);
CREATE TABLE Process_Outcomes (
  process_outcome_code TEXT PRIMARY KEY,
  process_outcome_description TEXT
);
CREATE TABLE Process_Status (
  process_status_code TEXT PRIMARY KEY,
  process_status_description TEXT
);
CREATE TABLE Authors (
  author_name TEXT PRIMARY KEY,
  other_details TEXT
);
CREATE TABLE Documents (
  document_id NUMBER PRIMARY KEY,
  author_name TEXT,
  document_name TEXT,
  document_description TEXT,
  other_details TEXT,
  FOREIGN KEY (author_name) REFERENCES Authors(author_name)
);
CREATE TABLE Business_Processes (
  process_id NUMBER PRIMARY KEY,
  next_process_id NUMBER,
  process_name TEXT,
  process_description TEXT,
  other_details TEXT
);
CREATE TABLE Documents_Processes (
  document_id NUMBER PRIMARY KEY,
  process_id NUMBER,
  process_outcome_code TEXT,
  process_status_code TEXT,
  FOREIGN KEY (process_status_code) REFERENCES Process_Status(process_status_code),
  FOREIGN KEY (process_outcome_code) REFERENCES Process_Outcomes(process_outcome_code),
  FOREIGN KEY (process_id) REFERENCES Business_Processes(process_id),
  FOREIGN KEY (document_id) REFERENCES Documents(document_id)
);
CREATE TABLE Staff_in_Processes (
  document_id NUMBER PRIMARY KEY,
  process_id NUMBER,
  staff_id NUMBER,
  staff_role_code TEXT,
  date_from TIME,
  date_to TIME,
  other_details TEXT,
  FOREIGN KEY (staff_role_code) REFERENCES Ref_Staff_Roles(staff_role_code),
  FOREIGN KEY (document_id) REFERENCES Documents_Processes(document_id),
  FOREIGN KEY (process_id) REFERENCES Documents_Processes(process_id),
  FOREIGN KEY (staff_id) REFERENCES Staff(staff_id)
);

Question: Show all author names.
SQL: SELECT author_name FROM Authors

Question: How many documents have a process?
SQL: SELECT count(DISTINCT document_id) FROM Documents_processes

Question: Show all process ids and the number of documents in each process.
SQL: SELECT process_id ,  count(*) FROM Documents_processes GROUP BY process_id

Question: How many different roles does the staff with id 3 have?
SQL: SELECT count(DISTINCT staff_role_code) FROM Staff_in_processes WHERE staff_id  =  3

Question: What is the description for process status code ct?
SQL: SELECT process_status_description FROM Process_status WHERE process_status_code  =  "ct"

Question: How many staff do we have?
SQL: SELECT count(*) FROM Staff

Question: Show the number of staff roles.
SQL: SELECT count(*) FROM Ref_staff_roles

Question: List all process ids with no document.
SQL: SELECT process_id FROM Business_processes EXCEPT SELECT process_id FROM Documents_processes

Question: Who is the author of the document with id 4?
SQL: SELECT author_name FROM Documents WHERE document_id  =  4

Question: Show the ids and names for all documents by author Bianka Cummings.
SQL: SELECT document_id ,  document_name FROM Documents WHERE author_name  =  "Bianka Cummings"

Question: What is the name of the author with most number of documents?
SQL: SELECT author_name FROM Documents GROUP BY author_name ORDER BY count(*) DESC LIMIT 1

Question: Show all staff role codes and the number of document processes for each role.
SQL: SELECT staff_role_code ,  count(*) FROM Staff_in_processes GROUP BY staff_role_code

Question: What is the description for the process outcome code working?
SQL: SELECT process_outcome_description FROM Process_outcomes WHERE process_outcome_code  =  "working"

Question: Show the names and descriptions for all documents.
SQL: SELECT document_name ,  document_description FROM Documents

Question: Show the number of process status.
SQL: SELECT count(*) FROM Process_status

Question: How many staff are the document with id 0 and process with id 9.
SQL: SELECT count(*) FROM Staff_in_processes WHERE document_id  =  0 AND process_id  =  9

Question: How many authors do we have?
SQL: SELECT count(*) FROM Authors

Question: What is the process name for the document "Travel to Brazil"?
SQL: SELECT T3.process_name FROM Documents_processes AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id JOIN Business_processes AS T3 ON T1.process_id  =  T3.process_id WHERE T2.document_name  =  "Travel to Brazil"

Question: Who is the author of the document "Travel to Brazil"?
SQL: SELECT author_name FROM Documents WHERE document_name  =  "Travel to Brazil"

Question: What is the process outcome description and process status description for the document with id 0?
SQL: SELECT T2.process_outcome_description ,  T3.process_status_description FROM Documents_processes AS T1 JOIN Process_outcomes AS T2 ON T1.process_outcome_code  =  T2.process_outcome_code JOIN Process_Status AS T3 ON T1.process_status_code  =  T3.process_status_code WHERE T1.document_id  =  0

Question: Show the author name and details for the document "Travel to China".
SQL: SELECT T2.author_name ,  T2.other_details FROM Documents AS T1 JOIN Authors AS T2 ON T1.author_name  =  T2.author_name WHERE document_name  =  "Travel to China"

Question: Show the number of documents.
SQL: SELECT count(*) FROM Documents

Question: What is the description for staff role code HR?
SQL: SELECT staff_role_description FROM Ref_staff_roles WHERE staff_role_code  =  "HR"

Question: What are the details for the staff member with id 100.
SQL: SELECT staff_details FROM Staff WHERE staff_id  =  100

Question: Show the names for authors with at least two documents.
SQL: SELECT author_name FROM Documents GROUP BY author_name HAVING count(*)  >=  2

Question: Show the names and other details for all authors.
SQL: SELECT author_name ,  other_details FROM Authors

Question: List the codes and descriptions for all process outcomes.
SQL: SELECT process_outcome_code ,  process_outcome_description FROM Process_outcomes

Question: How many documents does has the author Era Kerluke written?
SQL: SELECT count(*) FROM Documents WHERE author_name  =  "Era Kerluke"

Question: Show all author names and number of documents corresponding to each.
SQL: SELECT author_name ,  count(*) FROM Documents GROUP BY author_name

Question: Show the ids and details for all staff.
SQL: SELECT staff_id ,  staff_details FROM Staff

Question: How many business processes do we have?
SQL: SELECT count(*) FROM Business_processes