db_id
stringlengths
4
31
text
stringlengths
370
4.84k
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many members of "Bootup Baltimore" are older than 18? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.age > 18
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of members in club "Bootup Baltimore" whose age is above 18. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.age > 18
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many members of club "Bootup Baltimore" are younger than 18? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.age < 18
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of members in club "Bootup Baltimore" whose age is below 18. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.age < 18
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of all the clubs that have at least a member from the city with city code "BAL". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.city_code = 'BAL'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which clubs have one or more members from the city with code "BAL"? Give me the names of the clubs. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.city_code = 'BAL'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of the clubs that have at least a member from the city with city code "HOU". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.city_code = 'HOU'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which clubs have one or more members from the city with code "HOU"? Give me the names of the clubs. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.city_code = 'HOU'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many clubs does the student named "Eric Tai" belong to? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select count ( distinct club.clubname ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Eric' and student.lname = 'Tai'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of clubs for which the student named "Eric Tai" is a member. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select count ( distinct club.clubname ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Eric' and student.lname = 'Tai'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the clubs having "Davis Steven" as a member. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Davis' and student.lname = 'Steven'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the clubs that have "Davis Steven" as a member? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Davis' and student.lname = 'Steven'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the clubs that have at least a member with advisor "1121". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.advisor = 1121
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which clubs have one or more members whose advisor is "1121"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.advisor = 1121
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average age of the members of the club "Bootup Baltimore"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the average age of the members in the club "Bootup Baltimore". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the average age of members of the club "Hopkins Student Enterprises". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Hopkins Student Enterprises'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: On average, how old are the members in the club "Hopkins Student Enterprises"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Hopkins Student Enterprises'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Retrieve the average age of members of the club "Tennis Club". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Tennis Club'
club_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Compute the average age of the members in the club "Tennis Club". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | ### Response: select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Tennis Club'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select grants.grant_amount from grants join documents on grants.grant_id = documents.grant_id where documents.sent_date < '1986-08-26 20:49:27' intersect select grant_amount from grants where grant_end_date > '1989-03-16 18:27:16'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select grants.grant_amount from grants join documents on grants.grant_id = documents.grant_id where documents.sent_date < '1986-08-26 20:49:27' intersect select grant_amount from grants where grant_end_date > '1989-03-16 18:27:16'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the project details of the project both producing patent and paper as outcomes. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id where project_outcomes.outcome_code = 'Paper' intersect select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id where project_outcomes.outcome_code = 'Patent'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details of the project that is producing both patents and papers as outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id where project_outcomes.outcome_code = 'Paper' intersect select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id where project_outcomes.outcome_code = 'Patent'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total grant amount of the organisations described as research? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select sum ( grant_amount ) from grants join organisations on grants.organisation_id = organisations.organisation_id join organisation_types on organisations.organisation_type = organisation_types.organisation_type where organisation_types.organisation_type_description = 'Research'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total amount of grant money for research? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select sum ( grant_amount ) from grants join organisations on grants.organisation_id = organisations.organisation_id join organisation_types on organisations.organisation_type = organisation_types.organisation_type where organisation_types.organisation_type_description = 'Research'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List from which date and to which date these staff work: project staff of the project which hires the most staffs | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select date_from , date_to from project_staff where project_id in ( select project_id from project_staff group by project_id order by count ( * ) desc limit 1 ) union select date_from , date_to from project_staff where role_code = 'leader'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select date_from , date_to from project_staff where project_id in ( select project_id from project_staff group by project_id order by count ( * ) desc limit 1 ) union select date_from , date_to from project_staff where role_code = 'leader'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the organisation ids and details of the organisations which are involved in | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisations.organisation_id , organisations.organisation_details from grants join organisations on grants.organisation_id = organisations.organisation_id group by organisations.organisation_id having sum ( grants.grant_amount ) > 6000
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids and details for all organizations that have grants of more than 6000 dollars? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisations.organisation_id , organisations.organisation_details from grants join organisations on grants.organisation_id = organisations.organisation_id group by organisations.organisation_id having sum ( grants.grant_amount ) > 6000
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the organisation type and id of the organisation which has the most number of research staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisations.organisation_type , organisations.organisation_id from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the type and id of the organization that has the most research staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisations.organisation_type , organisations.organisation_id from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which organisation type hires most research staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisations.organisation_type from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_type order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the type of the organization with the most research staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisations.organisation_type from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_type order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select documents.sent_date from documents join grants on documents.grant_id = grants.grant_id join organisations on grants.organisation_id = organisations.organisation_id join organisation_types on organisations.organisation_type = organisation_types.organisation_type where grants.grant_amount > 5000 and organisation_types.organisation_type_description = 'Research'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select documents.sent_date from documents join grants on documents.grant_id = grants.grant_id join organisations on grants.organisation_id = organisations.organisation_id join organisation_types on organisations.organisation_type = organisation_types.organisation_type where grants.grant_amount > 5000 and organisation_types.organisation_type_description = 'Research'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the response received dates for the documents described as 'Regular' or granted with more than 100? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select documents.response_received_date from documents join document_types on documents.document_type_code = document_types.document_type_code join grants on documents.grant_id = grants.grant_id where document_types.document_description = 'Regular' or grants.grant_amount > 100
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the response received date for the document described as Regular that was granted more than 100 dollars? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select documents.response_received_date from documents join document_types on documents.document_type_code = document_types.document_type_code join grants on documents.grant_id = grants.grant_id where document_types.document_description = 'Regular' or grants.grant_amount > 100
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the project details of the projects which did not hire any staff for a researcher role. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select project_details from projects where project_id not in ( select project_id from project_staff where role_code = 'researcher' )
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details for all projects that did not hire any staff in a research role? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select project_details from projects where project_id not in ( select project_id from project_staff where role_code = 'researcher' )
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select tasks.task_details , tasks.task_id , projects.project_id from tasks join projects on tasks.project_id = projects.project_id where projects.project_details = 'omnis' union select tasks.task_details , tasks.task_id , projects.project_id from tasks join projects on tasks.project_id = projects.project_id join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.project_id having count ( * ) > 2
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select tasks.task_details , tasks.task_id , projects.project_id from tasks join projects on tasks.project_id = projects.project_id where projects.project_details = 'omnis' union select tasks.task_details , tasks.task_id , projects.project_id from tasks join projects on tasks.project_id = projects.project_id join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.project_id having count ( * ) > 2
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When do all the researcher role staff start to work, and when do they stop working? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select date_from , date_to from project_staff where role_code = 'researcher'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When did researchers start and stop working? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select date_from , date_to from project_staff where role_code = 'researcher'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many kinds of roles are there for the staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select count ( distinct role_code ) from project_staff
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many different roles are there on the project staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select count ( distinct role_code ) from project_staff
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total amount of grants given by each organisations? Also list the organisation id. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select sum ( grant_amount ) , organisation_id from grants group by organisation_id
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total amount of grant money given to each organization and what is its id? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select sum ( grant_amount ) , organisation_id from grants group by organisation_id
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the project details of the projects with the research outcome described with the substring 'Published'. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id join research_outcomes on project_outcomes.outcome_code = research_outcomes.outcome_code where research_outcomes.outcome_description like '%Published%'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details for the project whose research has been published? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id join research_outcomes on project_outcomes.outcome_code = research_outcomes.outcome_code where research_outcomes.outcome_description like '%Published%'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many staff does each project has? List the project id and the number in an ascending order. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select project_staff.project_id , count ( * ) from project_staff join projects on project_staff.project_id = projects.project_id group by project_staff.project_id order by count ( * ) asc
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each project id, how many staff does it have? List them in increasing order. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select project_staff.project_id , count ( * ) from project_staff join projects on project_staff.project_id = projects.project_id group by project_staff.project_id order by count ( * ) asc
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the complete description of the researcher role. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select role_description from staff_roles where role_code = 'researcher'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the complete description of the job of a researcher? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select role_description from staff_roles where role_code = 'researcher'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When did the first staff for the projects started working? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select date_from from project_staff order by date_from asc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: When did the first staff member start working? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select date_from from project_staff order by date_from asc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which project made the most number of outcomes? List the project details and the project id. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select projects.project_details , projects.project_id from projects join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.project_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details and id of the project with the most outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select projects.project_details , projects.project_id from projects join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.project_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which projects have no outcome? List the project details. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select project_details from projects where project_id not in ( select project_id from project_outcomes )
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details of the project with no outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select project_details from projects where project_id not in ( select project_id from project_outcomes )
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which organisation hired the most number of research staff? List the organisation id, type and detail. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisations.organisation_id , organisations.organisation_type , organisations.organisation_details from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids, types, and details of the organization with the most research staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisations.organisation_id , organisations.organisation_type , organisations.organisation_details from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the role description and the id of the project staff involved in most number of project outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select staff_roles.role_description , project_staff.staff_id from staff_roles join project_staff on staff_roles.role_code = project_staff.role_code join project_outcomes on project_staff.project_id = project_outcomes.project_id group by project_staff.staff_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each staff id, what is the description of the role that is involved with the most number of projects? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select staff_roles.role_description , project_staff.staff_id from staff_roles join project_staff on staff_roles.role_code = project_staff.role_code join project_outcomes on project_staff.project_id = project_outcomes.project_id group by project_staff.staff_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which document type is described with the prefix 'Initial'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select document_type_code from document_types where document_description like 'Initial%'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the type of the document whose description starts with the word 'Initial'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select document_type_code from document_types where document_description like 'Initial%'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select grants.grant_start_date from grants join documents on grants.grant_id = documents.grant_id join document_types on documents.document_type_code = document_types.document_type_code where document_types.document_description = 'Regular' intersect select grants.grant_start_date from grants join documents on grants.grant_id = documents.grant_id join document_types on documents.document_type_code = document_types.document_type_code where document_types.document_description = 'Initial Application'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For grants that have descriptions of Regular and Initial Applications, what are their start dates? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select grants.grant_start_date from grants join documents on grants.grant_id = documents.grant_id join document_types on documents.document_type_code = document_types.document_type_code where document_types.document_description = 'Regular' intersect select grants.grant_start_date from grants join documents on grants.grant_id = documents.grant_id join document_types on documents.document_type_code = document_types.document_type_code where document_types.document_description = 'Initial Application'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many documents can one grant have at most? List the grant id and number. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select grant_id , count ( * ) from documents group by grant_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each grant id, how many documents does it have, and which one has the most? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select grant_id , count ( * ) from documents group by grant_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the organisation type description of the organisation detailed as 'quo'. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisation_types.organisation_type_description from organisation_types join organisations on organisation_types.organisation_type = organisations.organisation_type where organisations.organisation_details = 'quo'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the type description of the organization whose detail is listed as 'quo'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisation_types.organisation_type_description from organisation_types join organisations on organisation_types.organisation_type = organisations.organisation_type where organisations.organisation_details = 'quo'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisation_details from organisations join organisation_types on organisations.organisation_type = organisation_types.organisation_type where organisation_types.organisation_type_description = 'Sponsor' order by organisation_details
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details of all organizations that are described as Sponsors and sort the results in ascending order? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select organisation_details from organisations join organisation_types on organisations.organisation_type = organisation_types.organisation_type where organisation_types.organisation_type_description = 'Sponsor' order by organisation_details
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many Patent outcomes are generated from all the projects? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select count ( * ) from project_outcomes where outcome_code = 'Patent'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many patents outcomes were listed for all the projects? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select count ( * ) from project_outcomes where outcome_code = 'Patent'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many project staff worked as leaders or started working before '1989-04-24 23:51:54'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select count ( * ) from project_staff where role_code = 'leader' or date_from < '1989-04-24 23:51:54'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many project members were leaders or started working before '1989-04-24 23:51:54'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select count ( * ) from project_staff where role_code = 'leader' or date_from < '1989-04-24 23:51:54'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the last date of the staff leaving the projects? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select date_to from project_staff order by date_to desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the last date that a staff member left a project? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select date_to from project_staff order by date_to desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the result description of the project whose detail is 'sint'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select research_outcomes.outcome_description from research_outcomes join project_outcomes on research_outcomes.outcome_code = project_outcomes.outcome_code join projects on project_outcomes.project_id = projects.project_id where projects.project_details = 'sint'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the description for the results whose project detail is 'sint'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select research_outcomes.outcome_description from research_outcomes join project_outcomes on research_outcomes.outcome_code = project_outcomes.outcome_code join projects on project_outcomes.project_id = projects.project_id where projects.project_details = 'sint'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the organisation id with the maximum outcome count, and the count. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select projects.organisation_id , count ( * ) from projects join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.organisation_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the id of the organization with the maximum number of outcomes and how many outcomes are there? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select projects.organisation_id , count ( * ) from projects join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.organisation_id order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the project details of the projects launched by the organisation | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select project_details from projects where organisation_id in ( select organisation_id from projects group by organisation_id order by count ( * ) desc limit 1 )
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details for the projects which were launched by the organization with the most projects? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select project_details from projects where organisation_id in ( select organisation_id from projects group by organisation_id order by count ( * ) desc limit 1 )
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the research staff details, and order in ascending order. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select staff_details from research_staff order by staff_details asc
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What details are there on the research staff? List the result in ascending alphabetical order. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select staff_details from research_staff order by staff_details asc
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many tasks are there in total? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select count ( * ) from tasks
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many tasks are there? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select count ( * ) from tasks
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many tasks does each project have? List the task count and the project detail. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select count ( * ) , projects.project_details from projects join tasks on projects.project_id = tasks.project_id group by projects.project_id
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each project id, how many tasks are there? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select count ( * ) , projects.project_details from projects join tasks on projects.project_id = tasks.project_id group by projects.project_id
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the staff roles of the staff who | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select role_code from project_staff where date_from > '2003-04-19 15:06:20' and date_to < '2016-03-15 00:33:18'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select role_code from project_staff where date_from > '2003-04-19 15:06:20' and date_to < '2016-03-15 00:33:18'
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the descriptions of all the project outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select research_outcomes.outcome_description from research_outcomes join project_outcomes on research_outcomes.outcome_code = project_outcomes.outcome_code
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the description of the outcomes for all projects. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select research_outcomes.outcome_description from research_outcomes join project_outcomes on research_outcomes.outcome_code = project_outcomes.outcome_code
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which role is most common for the staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select role_code from project_staff group by role_code order by count ( * ) desc limit 1
tracking_grants_for_research
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the most common role for the staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | ### Response: select role_code from project_staff group by role_code order by count ( * ) desc limit 1
network_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many friends does Dan have? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | ### Response: select count ( personfriend.friend ) from person join personfriend on person.name = personfriend.name where person.name = 'Dan'
network_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many friends does Dan have? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | ### Response: select count ( personfriend.friend ) from person join personfriend on person.name = personfriend.name where person.name = 'Dan'