aherntech/sparc huggingface dataset:
Database: tracking_grants_for_research
Question sequence:
Which organization has the least number of research staff?
How about the one with the most number of research staff?
List the organization type together with the result.
SQL query sequence:
SELECT T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) ASC LIMIT 1;
SELECT T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;
SELECT T1.organisation_type ,  T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;
Final question: What is the organisation type and id of the organisation which has the most number of research staff?
Final SQL: SELECT T1.organisation_type ,  T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;
Database: tracking_grants_for_research
Question sequence:
Show me all the organization types.
Which of those hires the least research staff?
How about the one hiring the most research staff?
SQL query sequence:
SELECT organisation_type FROM Organisations;
SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) ASC LIMIT 1;
SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1;
Final question: Which organisation type hires most research staff?
Final SQL: SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1;
Database: tracking_grants_for_research
Question sequence:
Show me the all documents with grant amount more than 5000 dollars.
Which of the result were granted by organisation type described research.
Show me their send dates.
SQL query sequence:
SELECT * FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id  =  T2.grant_id WHERE T2.grant_amount  >  5000;
SELECT * FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id  =  T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id  =  T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type  =  T4.organisation_type WHERE T2.grant_amount  >  5000 AND T4.organisation_type_description  =  'Research'
SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id  =  T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id  =  T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type  =  T4.organisation_type WHERE T2.grant_amount  >  5000 AND T4.organisation_type_description  =  'Research'
Final question: Find out the send dates of the documents with the grant amount of more than 5000 which were granted by organisation type described research.
Final SQL: SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id  =  T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id  =  T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type  =  T4.organisation_type WHERE T2.grant_amount  >  5000 AND T4.organisation_type_description  =  'Research'
Database: tracking_grants_for_research
Question sequence:
What're the response received dates for the documents described as 'Initial Application'?
How about those granted with more than 100?
What are the response received dates for the documents described as 'Regular' or granted with more than 100?
SQL query sequence:
SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code  =  T2.document_type_code WHERE T2.document_description  =  'Initial Application';
SELECT T1.response_received_date FROM Documents AS T1 JOIN Grants AS T3 ON T1.grant_id  =  T3.grant_id WHERE T3.grant_amount  >  100;
SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code  =  T2.document_type_code JOIN Grants AS T3 ON T1.grant_id  =  T3.grant_id WHERE T2.document_description  =  'Regular' OR T3.grant_amount  >  100
Final question: What are the response received dates for the documents described as 'Regular' or granted with more than 100?
Final SQL: SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code  =  T2.document_type_code JOIN Grants AS T3 ON T1.grant_id  =  T3.grant_id WHERE T2.document_description  =  'Regular' OR T3.grant_amount  >  100
Database: tracking_grants_for_research
Question sequence:
Show me the project ids of the projects which did not hire any staff for a leader role.
How about those without a researcher role?
What are their details?
SQL query sequence:
SELECT project_id FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code  =  'leader' )
SELECT project_id FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code  =  'researcher' )
SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code  =  'researcher' )
Final question: List the project details of the projects which did not hire any staff for a researcher role.
Final SQL: SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code  =  'researcher' )
Database: tracking_grants_for_research
Question sequence:
Show me the task ids for projects detailed as 'omnis'.
How about the project id for projects which are detailed as 'omnis' or  have more than 2 outcomes?
List the corresponding task details and task id as well.
SQL query sequence:
SELECT  T1.task_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id WHERE T2.project_details  =  'omnis';
SELECT T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id WHERE T2.project_details  =  'omnis' UNION SELECT T1.task_details ,  T1.task_id ,  T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.project_id HAVING count(*)  >  2
SELECT T1.task_details ,  T1.task_id ,  T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id WHERE T2.project_details  =  'omnis' UNION SELECT T1.task_details ,  T1.task_id ,  T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.project_id HAVING count(*)  >  2
Final question: What are the task details, task id and project id for the projects which are detailed as 'omnis' or  have more than 2 outcomes?
Final SQL: SELECT T1.task_details ,  T1.task_id ,  T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id WHERE T2.project_details  =  'omnis' UNION SELECT T1.task_details ,  T1.task_id ,  T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.project_id HAVING count(*)  >  2
Database: tracking_grants_for_research
Question sequence:
Show me all the research outcome.
List those described with the substring 'Published' in the result.
How about the project details of the result?
SQL query sequence:
SELECT * FROM Research_outcomes;
SELECT * FROM Research_outcomes WHERE outcome_description LIKE '%Published%';
SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code  =  T3.outcome_code WHERE T3.outcome_description LIKE '%Published%';
Final question: List the project details of the projects with the research outcome described with the substring 'Published'.
Final SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code  =  T3.outcome_code WHERE T3.outcome_description LIKE '%Published%';
Database: tracking_grants_for_research
Question sequence:
Show me the number of staff for project with id 1.
How about the number of staff each project has? List the project id and the number.
Order the result by ascending number of staff.
SQL query sequence:
SELECT  count(*) FROM Project_Staff WHERE project_id = 1;
SELECT T1.project_id ,  count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id;
SELECT T1.project_id ,  count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC;
Final question: How many staff does each project has? List the project id and the number in an ascending order.
Final SQL: SELECT T1.project_id ,  count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC;
Database: tracking_grants_for_research
Question sequence:
Show me the end date of all projects staff.
What about the start date?
What's the earliest date among the result?
SQL query sequence:
SELECT date_to FROM Project_Staff;
SELECT date_from FROM Project_Staff;
SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1;
Final question: When did the first staff for the projects started working?
Final SQL: SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1;
Database: tracking_grants_for_research
Question sequence:
Show me the project ids of all projects.
Which of those had the most number of outcomes?
Show me the project details as well.
SQL query sequence:
SELECT project_id FROM Projects;
SELECT T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1;
SELECT T1.project_details ,  T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1;
Final question: Which project made the most number of outcomes? List the project details and the project id.
Final SQL: SELECT T1.project_details ,  T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1;
Database: tracking_grants_for_research
Question sequence:
Show me all the ids of projects with outcomes.
How many projects do not have outcome?
List their details.
SQL query sequence:
SELECT project_id FROM Project_outcomes;
SELECT count(*) FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes );
SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes );
Final question: Which projects have no outcome? List the project details.
Final SQL: SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes );
Database: tracking_grants_for_research
Question sequence:
Show me the number of research staff each organisation hired.
Which organisation hired the least number? Show ids.
How about the most number of research staff. List the organisation id, type and detail.
SQL query sequence:
SELECT count(*) FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id;
SELECT T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) ASC LIMIT 1;
SELECT T1.organisation_id ,  T1.organisation_type ,  T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;
Final question: Which organisation hired the most number of research staff? List the organisation id, type and detail.
Final SQL: SELECT T1.organisation_id ,  T1.organisation_type ,  T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;
Database: tracking_grants_for_research
Question sequence:
What are the number of project outcomes each project staff involved in?
Who is involved in the most number of project outcomes? Show ids.
Give me the person's role description.
SQL query sequence:
SELECT count(*) FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code  =  T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.staff_id;
SELECT T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code  =  T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1;
SELECT T1.role_description ,  T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code  =  T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1;
Final question: Show the role description and the id of the project staff involved in most number of project outcomes?
Final SQL: SELECT T1.role_description ,  T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code  =  T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1;
Database: tracking_grants_for_research
Question sequence:
Show me all the document type description.
How about document type code?
Which one is described with the prefix 'Initial'?
SQL query sequence:
SELECT document_description FROM Document_Types;
SELECT document_type_code FROM Document_Types ;
SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%';
Final question: Which document type is described with the prefix 'Initial'?
Final SQL: SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%';
Database: tracking_grants_for_research
Question sequence:
Show me all the grants start dates.
Which ones of those have documents described as 'Regular'?
How about ones that have both documents described as 'Regular' and documents described as 'Initial Application'?
SQL query sequence:
SELECT grant_start_date FROM Grants;
SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Regular';
SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Initial Application'
Final question: For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.
Final SQL: SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Initial Application'
Database: tracking_grants_for_research
Question sequence:
How many documents are there?
How many documents does each grant have? List the grant id and number.
Give me the one having the most documents.
SQL query sequence:
SELECT count(*) FROM Documents;
SELECT grant_id ,  count(*) FROM Documents GROUP BY grant_id ;
SELECT grant_id ,  count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1;
Final question: How many documents can one grant have at most? List the grant id and number.
Final SQL: SELECT grant_id ,  count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1;
Database: tracking_grants_for_research
Question sequence:
Show me the organisation types.
How about the type description?
Find the ones detailed as "quo".
SQL query sequence:
SELECT organisation_Type FROM organisation_Types;
SELECT organisation_type_description FROM organisation_Types;
SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_details  =  'quo';
Final question: Find the organisation type description of the organisation detailed as 'quo'.
Final SQL: SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_details  =  'quo';
Database: tracking_grants_for_research
Question sequence:
Show me all the details of organisations.
Among the result, which ones are described as 'Sponsor'?
Sort the result in an ascending order.
SQL query sequence:
SELECT organisation_details FROM Organisations;
SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_type_description  =  'Sponsor';
SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_type_description  =  'Sponsor' ORDER BY organisation_details ASC;
Final question: What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.
Final SQL: SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_type_description  =  'Sponsor' ORDER BY organisation_details ASC;
Database: tracking_grants_for_research
Question sequence:
Show me the number of project staffs.
How many of those worked as leaders?
How about the number of those who either worked as leaders or started working before '1989-04-24 23:51:54'?
SQL query sequence:
SELECT count(*) FROM Project_Staff;
SELECT count(*) FROM Project_Staff WHERE role_code  =  'leader';
SELECT count(*) FROM Project_Staff WHERE role_code  =  'leader' OR date_from  <  '1989-04-24 23:51:54';
Final question: How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?
Final SQL: SELECT count(*) FROM Project_Staff WHERE role_code  =  'leader' OR date_from  <  '1989-04-24 23:51:54';
Database: tracking_grants_for_research
Question sequence:
What are the start dates of project staff?
What about the end date of them?
What's the last date among the result?
SQL query sequence:
SELECT date_from FROM Project_Staff;
SELECT date_to FROM Project_Staff;
SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1;
Final question: What is the last date of the staff leaving the projects?
Final SQL: SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1;
Database: tracking_grants_for_research
Question sequence:
Give me the outcome descriptions of research outcomes.
What are the result description of the project whose detail is 'sed'?
How about 'sint'?
SQL query sequence:
SELECT outcome_description FROM Research_outcomes;
SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code JOIN Projects AS T3 ON T2.project_id  =  T3.project_id WHERE T3.project_details  =  'sed';
SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code JOIN Projects AS T3 ON T2.project_id  =  T3.project_id WHERE T3.project_details  =  'sint';
Final question: What are the result description of the project whose detail is 'sint'?
Final SQL: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code JOIN Projects AS T3 ON T2.project_id  =  T3.project_id WHERE T3.project_details  =  'sint';
Database: tracking_grants_for_research
Question sequence:
Show me the outcome count for each organisation.
Which organisation has the least number of outcome? Show ids.
How about the one with the most outcome count? Show the count as well.
SQL query sequence:
SELECT count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.organisation_id;
SELECT  T1.organisation_id  FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) ASC LIMIT 1;
SELECT T1.organisation_id ,  count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;
Final question: List the organisation id with the maximum outcome count, and the count.
Final SQL: SELECT T1.organisation_id ,  count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;
Database: tracking_grants_for_research
Question sequence:
What're the project details?
Show me only the one launched by the organisation with the most number of projects.
How about the one with most projects?
SQL query sequence:
SELECT project_details FROM Projects;
SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) ASC LIMIT 1 );
SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 );
Final question: List the project details of the projects launched by the organisation with the most number of projects.
Final SQL: SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 );
Database: tracking_grants_for_research
Question sequence:
How tasks are there?
How many tasks does each project have?
Show the project details as well.
SQL query sequence:
SELECT count(*) FROM Tasks;
SELECT count(*) FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id;
SELECT count(*) ,  T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id;
Final question: How many tasks does each project have? List the task count and the project detail.
Final SQL: SELECT count(*) ,  T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id;
Database: tracking_grants_for_research
Question sequence:
Show me all the role codes.
How about those of staff who starts working after 2003-04-19 15:06:20?
List those of the staff who starts working after 2003-04-19 15:06:20 and ends working before 2016-03-15 00:33:18?
SQL query sequence:
SELECT role_code FROM Project_Staff;
SELECT role_code FROM Project_Staff WHERE date_from  >  '2003-04-19 15:06:20';
SELECT role_code FROM Project_Staff WHERE date_from  >  '2003-04-19 15:06:20' AND date_to  <  '2016-03-15 00:33:18'
Final question: What are the staff roles of the staff who starts working after 2003-04-19 15:06:20 and ends working before 2016-03-15 00:33:18?
Final SQL: SELECT role_code FROM Project_Staff WHERE date_from  >  '2003-04-19 15:06:20' AND date_to  <  '2016-03-15 00:33:18'