db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
club_1
select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = 'bootup baltimore' and t3.age > 18
Question: how many members of 'bootup baltimore' are older than 18? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID = Student.Stu...
how many members of 'bootup baltimore' are older than 18?
club_1
select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = 'bootup baltimore' and t3.age > 18
Question: count the number of members in club 'bootup baltimore' whose age is above 18. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club...
count the number of members in club 'bootup baltimore' whose age is above 18.
club_1
select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = 'bootup baltimore' and t3.age < 18
Question: how many members of club 'bootup baltimore' are younger than 18? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID = Stud...
how many members of club 'bootup baltimore' are younger than 18?
club_1
select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = 'bootup baltimore' and t3.age < 18
Question: count the number of members in club 'bootup baltimore' whose age is below 18. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club...
count the number of members in club 'bootup baltimore' whose age is below 18.
club_1
select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.city_code = 'bal'
Question: find the names of all the clubs that have at least a member from the city with city code 'bal'. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.Club...
find the names of all the clubs that have at least a member from the city with city code 'bal'.
club_1
select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.city_code = 'bal'
Question: which clubs have one or more members from the city with code 'bal'? give me the names of the clubs. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club....
which clubs have one or more members from the city with code 'bal'? give me the names of the clubs.
club_1
select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.city_code = 'hou'
Question: find the names of the clubs that have at least a member from the city with city code 'hou'. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, ...
find the names of the clubs that have at least a member from the city with city code 'hou'.
club_1
select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.city_code = 'hou'
Question: which clubs have one or more members from the city with code 'hou'? give me the names of the clubs. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club....
which clubs have one or more members from the city with code 'hou'? give me the names of the clubs.
club_1
select count(distinct t1.clubname) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = 'eric' and t3.lname = 'tai'
Question: how many clubs does the student named 'eric tai' belong to? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID = Student.S...
how many clubs does the student named 'eric tai' belong to?
club_1
select count(distinct t1.clubname) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = 'eric' and t3.lname = 'tai'
Question: count the number of clubs for which the student named 'eric tai' is a member. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club...
count the number of clubs for which the student named 'eric tai' is a member.
club_1
select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = 'davis' and t3.lname = 'steven'
Question: list the clubs having 'davis steven' as a member. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID = Student.StuID,
list the clubs having 'davis steven' as a member.
club_1
select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = 'davis' and t3.lname = 'steven'
Question: what are the names of the clubs that have 'davis steven' as a member? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID =...
what are the names of the clubs that have 'davis steven' as a member?
club_1
select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.advisor = 1121
Question: list the clubs that have at least a member with advisor '1121'. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID = Stude...
list the clubs that have at least a member with advisor '1121'.
club_1
select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.advisor = 1121
Question: which clubs have one or more members whose advisor is '1121'? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID = Student...
which clubs have one or more members whose advisor is '1121'?
club_1
select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = 'bootup baltimore'
Question: what is the average age of the members of the club 'bootup baltimore'? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID ...
what is the average age of the members of the club 'bootup baltimore'?
club_1
select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = 'bootup baltimore'
Question: find the average age of the members in the club 'bootup baltimore'. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID = S...
find the average age of the members in the club 'bootup baltimore'.
club_1
select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = 'hopkins student enterprises'
Question: find the average age of members of the club 'hopkins student enterprises'. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.St...
find the average age of members of the club 'hopkins student enterprises'.
club_1
select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = 'hopkins student enterprises'
Question: on average, how old are the members in the club 'hopkins student enterprises'? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_clu...
on average, how old are the members in the club 'hopkins student enterprises'?
club_1
select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = 'tennis club'
Question: retrieve the average age of members of the club 'tennis club'. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID = Studen...
retrieve the average age of members of the club 'tennis club'.
club_1
select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = 'tennis club'
Question: compute the average age of the members in the club 'tennis club'. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Club -> ClubID, ClubName, ClubDesc, ClubLocation. Member_of_club -> StuID, ClubID, Position. | Joins: Member_of_club.ClubID = Club.ClubID, Member_of_club.StuID = Stu...
compute the average age of the members in the club 'tennis club'.
tracking_grants_for_research
select t1.grant_amount from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id where t2.sent_date < '1986-08-26 20:49:27' intersect select grant_amount from grants where grant_end_date > '1989-03-16 18:27:16'
Question: 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'? | Tables: Document_Types -> document_type_code, document_description. Documents -> document_id, document_type_code, grant_id, sent_date, response_recei...
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'?
tracking_grants_for_research
select t1.grant_amount from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id where t2.sent_date < '1986-08-26 20:49:27' intersect select grant_amount from grants where grant_end_date > '1989-03-16 18:27:16'
Question: 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'? | Tables: Document_Types -> document_type_code, document_description. Documents -> document_id, document_type_code, grant_id, sent_date, response_received_date, other_detail...
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'?
tracking_grants_for_research
select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id where t2.outcome_code = 'paper' intersect select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id where t2.outcome_code = 'patent'
Question: list the project details of the project both producing patent and paper as outcomes. | Tables: 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...
list the project details of the project both producing patent and paper as outcomes.
tracking_grants_for_research
select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id where t2.outcome_code = 'paper' intersect select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id where t2.outcome_code = 'patent'
Question: what are the details of the project that is producing both patents and papers as outcomes? | Tables: 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_...
what are the details of the project that is producing both patents and papers as outcomes?
tracking_grants_for_research
select sum(grant_amount) from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id join organisation_types as t3 on t2.organisation_type = t3.organisation_type where t3.organisation_type_description = 'research'
Question: what is the total grant amount of the organisations described as research? | Tables: 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_st...
what is the total grant amount of the organisations described as research?
tracking_grants_for_research
select sum(grant_amount) from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id join organisation_types as t3 on t2.organisation_type = t3.organisation_type where t3.organisation_type_description = 'research'
Question: what is the total amount of grant money for research? | Tables: 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_d...
what is the total amount of grant money for research?
tracking_grants_for_research
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'
Question: list from which date and to which date these staff work: project staff of the project which hires the most staffs | Tables: 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, ...
list from which date and to which date these staff work: project staff of the project which hires the most staffs
tracking_grants_for_research
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'
Question: 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? | Tables: Document_Types -> document_type_code, document_description. Documents -> document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. Grants -> grant...
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?
tracking_grants_for_research
select t2.organisation_id , t2.organisation_details from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id group by t2.organisation_id having sum(t1.grant_amount) > 6000
Question: find the organisation ids and details of the organisations which are involved in | Tables: 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, gr...
find the organisation ids and details of the organisations which are involved in
tracking_grants_for_research
select t2.organisation_id , t2.organisation_details from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id group by t2.organisation_id having sum(t1.grant_amount) > 6000
Question: what are the ids and details for all organizations that have grants of more than 6000 dollars? | Tables: 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, gr...
what are the ids and details for all organizations that have grants of more than 6000 dollars?
tracking_grants_for_research
select t1.organisation_type , t1.organisation_id from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_id order by count(*) desc limit 1
Question: what is the organisation type and id of the organisation which has the most number of research staff? | Tables: 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...
what is the organisation type and id of the organisation which has the most number of research staff?
tracking_grants_for_research
select t1.organisation_type , t1.organisation_id from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_id order by count(*) desc limit 1
Question: what is the type and id of the organization that has the most research staff? | Tables: 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...
what is the type and id of the organization that has the most research staff?
tracking_grants_for_research
select t1.organisation_type from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_type order by count(*) desc limit 1
Question: which organisation type hires most research staff? | Tables: 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...
which organisation type hires most research staff?
tracking_grants_for_research
select t1.organisation_type from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_type order by count(*) desc limit 1
Question: what is the type of the organization with the most research staff? | Tables: 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...
what is the type of the organization with the most research staff?
tracking_grants_for_research
select t1.sent_date from documents as t1 join grants as t2 on t1.grant_id = t2.grant_id join organisations as t3 on t2.organisation_id = t3.organisation_id join organisation_types as t4 on t3.organisation_type = t4.organisation_type where t2.grant_amount > 5000 and t4.organisation_type_description = 'research...
Question: find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described | Tables: Document_Types -> document_type_code, document_description. Documents -> document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. Grants ->...
find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described
tracking_grants_for_research
select t1.sent_date from documents as t1 join grants as t2 on t1.grant_id = t2.grant_id join organisations as t3 on t2.organisation_id = t3.organisation_id join organisation_types as t4 on t3.organisation_type = t4.organisation_type where t2.grant_amount > 5000 and t4.organisation_type_description = 'research...
Question: what are the send dates for all documents that have a grant amount of more than 5000 and are involved in research? | Tables: 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,...
what are the send dates for all documents that have a grant amount of more than 5000 and are involved in research?
tracking_grants_for_research
select t1.response_received_date from documents as t1 join document_types as t2 on t1.document_type_code = t2.document_type_code join grants as t3 on t1.grant_id = t3.grant_id where t2.document_description = 'regular' or t3.grant_amount > 100
Question: what are the response received dates for the documents described as 'regular' or granted with more than 100? | Tables: 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, organ...
what are the response received dates for the documents described as 'regular' or granted with more than 100?
tracking_grants_for_research
select t1.response_received_date from documents as t1 join document_types as t2 on t1.document_type_code = t2.document_type_code join grants as t3 on t1.grant_id = t3.grant_id where t2.document_description = 'regular' or t3.grant_amount > 100
Question: what is the response received date for the document described as regular that was granted more than 100 dollars? | Tables: 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, o...
what is the response received date for the document described as regular that was granted more than 100 dollars?
tracking_grants_for_research
select project_details from projects where project_id not in ( select project_id from project_staff where role_code = 'researcher' )
Question: list the project details of the projects which did not hire any staff for a researcher role. | Tables: 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, gran...
list the project details of the projects which did not hire any staff for a researcher role.
tracking_grants_for_research
select project_details from projects where project_id not in ( select project_id from project_staff where role_code = 'researcher' )
Question: what are the details for all projects that did not hire any staff in a research role? | Tables: 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_amoun...
what are the details for all projects that did not hire any staff in a research role?
tracking_grants_for_research
select t1.task_details , t1.task_id , t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'omnis' union select t1.task_details , t1.task_id , t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id join project_outcomes as ...
Question: what are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes? | Tables: Document_Types -> document_type_code, document_description. Documents -> document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. Grants...
what are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?
tracking_grants_for_research
select t1.task_details , t1.task_id , t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'omnis' union select t1.task_details , t1.task_id , t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id join project_outcomes as ...
Question: what are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes? | Tables: Document_Types -> document_type_code, document_description. Documents -> document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. Grant...
what are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?
tracking_grants_for_research
select date_from , date_to from project_staff where role_code = 'researcher'
Question: when do all the researcher role staff start to work, and when do they stop working? | Tables: 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,...
when do all the researcher role staff start to work, and when do they stop working?
tracking_grants_for_research
select date_from , date_to from project_staff where role_code = 'researcher'
Question: when did researchers start and stop working? | Tables: 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, othe...
when did researchers start and stop working?
tracking_grants_for_research
select count(distinct role_code) from project_staff
Question: how many kinds of roles are there for the staff? | Tables: 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, ...
how many kinds of roles are there for the staff?
tracking_grants_for_research
select count(distinct role_code) from project_staff
Question: how many different roles are there on the project staff? | Tables: 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_en...
how many different roles are there on the project staff?
tracking_grants_for_research
select sum(grant_amount) , organisation_id from grants group by organisation_id
Question: what is the total amount of grants given by each organisations? also list the organisation id. | Tables: 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, gr...
what is the total amount of grants given by each organisations? also list the organisation id.
tracking_grants_for_research
select sum(grant_amount) , organisation_id from grants group by organisation_id
Question: what is the total amount of grant money given to each organization and what is its id? | Tables: 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_amou...
what is the total amount of grant money given to each organization and what is its id?
tracking_grants_for_research
select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id join research_outcomes as t3 on t2.outcome_code = t3.outcome_code where t3.outcome_description like '%published%'
Question: list the project details of the projects with the research outcome described with the substring 'published'. | Tables: 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, organ...
list the project details of the projects with the research outcome described with the substring 'published'.
tracking_grants_for_research
select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id join research_outcomes as t3 on t2.outcome_code = t3.outcome_code where t3.outcome_description like '%published%'
Question: what are the details for the project whose research has been published? | Tables: 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...
what are the details for the project whose research has been published?
tracking_grants_for_research
select t1.project_id , count(*) from project_staff as t1 join projects as t2 on t1.project_id = t2.project_id group by t1.project_id order by count(*) asc
Question: how many staff does each project has? list the project id and the number in an ascending order. | Tables: 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, g...
how many staff does each project has? list the project id and the number in an ascending order.
tracking_grants_for_research
select t1.project_id , count(*) from project_staff as t1 join projects as t2 on t1.project_id = t2.project_id group by t1.project_id order by count(*) asc
Question: for each project id, how many staff does it have? list them in increasing order. | Tables: 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, gr...
for each project id, how many staff does it have? list them in increasing order.
tracking_grants_for_research
select role_description from staff_roles where role_code = 'researcher'
Question: what is the complete description of the researcher role. | Tables: 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_en...
what is the complete description of the researcher role.
tracking_grants_for_research
select role_description from staff_roles where role_code = 'researcher'
Question: what is the complete description of the job of a researcher? | Tables: 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, gran...
what is the complete description of the job of a researcher?
tracking_grants_for_research
select date_from from project_staff order by date_from asc limit 1
Question: when did the first staff for the projects started working? | Tables: 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_...
when did the first staff for the projects started working?
tracking_grants_for_research
select date_from from project_staff order by date_from asc limit 1
Question: when did the first staff member start working? | Tables: 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, ot...
when did the first staff member start working?
tracking_grants_for_research
select t1.project_details , t1.project_id from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.project_id order by count(*) desc limit 1
Question: which project made the most number of outcomes? list the project details and the project id. | Tables: 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, gran...
which project made the most number of outcomes? list the project details and the project id.
tracking_grants_for_research
select t1.project_details , t1.project_id from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.project_id order by count(*) desc limit 1
Question: what are the details and id of the project with the most outcomes? | Tables: 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...
what are the details and id of the project with the most outcomes?
tracking_grants_for_research
select project_details from projects where project_id not in ( select project_id from project_outcomes )
Question: which projects have no outcome? list the project details. | Tables: 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_e...
which projects have no outcome? list the project details.
tracking_grants_for_research
select project_details from projects where project_id not in ( select project_id from project_outcomes )
Question: what are the details of the project with no outcomes? | Tables: 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_d...
what are the details of the project with no outcomes?
tracking_grants_for_research
select t1.organisation_id , t1.organisation_type , t1.organisation_details from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_id order by count(*) desc limit 1
Question: which organisation hired the most number of research staff? list the organisation id, type and detail. | Tables: 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, organisatio...
which organisation hired the most number of research staff? list the organisation id, type and detail.
tracking_grants_for_research
select t1.organisation_id , t1.organisation_type , t1.organisation_details from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_id order by count(*) desc limit 1
Question: what are the ids, types, and details of the organization with the most research staff? | Tables: 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_amou...
what are the ids, types, and details of the organization with the most research staff?
tracking_grants_for_research
select t1.role_description , t2.staff_id from staff_roles as t1 join project_staff as t2 on t1.role_code = t2.role_code join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.staff_id order by count(*) desc limit 1
Question: show the role description and the id of the project staff involved in most number of project outcomes? | Tables: 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, organisatio...
show the role description and the id of the project staff involved in most number of project outcomes?
tracking_grants_for_research
select t1.role_description , t2.staff_id from staff_roles as t1 join project_staff as t2 on t1.role_code = t2.role_code join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.staff_id order by count(*) desc limit 1
Question: for each staff id, what is the description of the role that is involved with the most number of projects? | Tables: 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, organisa...
for each staff id, what is the description of the role that is involved with the most number of projects?
tracking_grants_for_research
select document_type_code from document_types where document_description like 'initial%'
Question: which document type is described with the prefix 'initial'? | Tables: 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...
which document type is described with the prefix 'initial'?
tracking_grants_for_research
select document_type_code from document_types where document_description like 'initial%'
Question: what is the type of the document whose description starts with the word 'initial'? | Tables: 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, ...
what is the type of the document whose description starts with the word 'initial'?
tracking_grants_for_research
select t1.grant_start_date from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'regular' intersect select t1.grant_start_date from grants as t1 join documents as t2 on t1.grant_id = t2.gran...
Question: for grants with both documents described as 'regular' and documents described as 'initial application', list its start date. | Tables: Document_Types -> document_type_code, document_description. Documents -> document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. Grants ->...
for grants with both documents described as 'regular' and documents described as 'initial application', list its start date.
tracking_grants_for_research
select t1.grant_start_date from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'regular' intersect select t1.grant_start_date from grants as t1 join documents as t2 on t1.grant_id = t2.gran...
Question: for grants that have descriptions of regular and initial applications, what are their start dates? | Tables: 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...
for grants that have descriptions of regular and initial applications, what are their start dates?
tracking_grants_for_research
select grant_id , count(*) from documents group by grant_id order by count(*) desc limit 1
Question: how many documents can one grant have at most? list the grant id and number. | Tables: 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_...
how many documents can one grant have at most? list the grant id and number.
tracking_grants_for_research
select grant_id , count(*) from documents group by grant_id order by count(*) desc limit 1
Question: for each grant id, how many documents does it have, and which one has the most? | Tables: 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, gra...
for each grant id, how many documents does it have, and which one has the most?
tracking_grants_for_research
select t1.organisation_type_description from organisation_types as t1 join organisations as t2 on t1.organisation_type = t2.organisation_type where t2.organisation_details = 'quo'
Question: find the organisation type description of the organisation detailed as 'quo'. | Tables: 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...
find the organisation type description of the organisation detailed as 'quo'.
tracking_grants_for_research
select t1.organisation_type_description from organisation_types as t1 join organisations as t2 on t1.organisation_type = t2.organisation_type where t2.organisation_details = 'quo'
Question: what is the type description of the organization whose detail is listed as 'quo'? | Tables: 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, g...
what is the type description of the organization whose detail is listed as 'quo'?
tracking_grants_for_research
select organisation_details from organisations as t1 join organisation_types as t2 on t1.organisation_type = t2.organisation_type where t2.organisation_type_description = 'sponsor' order by organisation_details
Question: what are all the details of the organisations described as 'sponsor'? sort the result in an ascending order. | Tables: 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, organ...
what are all the details of the organisations described as 'sponsor'? sort the result in an ascending order.
tracking_grants_for_research
select organisation_details from organisations as t1 join organisation_types as t2 on t1.organisation_type = t2.organisation_type where t2.organisation_type_description = 'sponsor' order by organisation_details
Question: what are the details of all organizations that are described as sponsors and sort the results in ascending order? | Tables: 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, ...
what are the details of all organizations that are described as sponsors and sort the results in ascending order?
tracking_grants_for_research
select count(*) from project_outcomes where outcome_code = 'patent'
Question: how many patent outcomes are generated from all the projects? | Tables: 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, gra...
how many patent outcomes are generated from all the projects?
tracking_grants_for_research
select count(*) from project_outcomes where outcome_code = 'patent'
Question: how many patents outcomes were listed for all the projects? | Tables: 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...
how many patents outcomes were listed for all the projects?
tracking_grants_for_research
select count(*) from project_staff where role_code = 'leader' or date_from < '1989-04-24 23:51:54'
Question: how many project staff worked as leaders or started working before '1989-04-24 23:51:54'? | Tables: 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_a...
how many project staff worked as leaders or started working before '1989-04-24 23:51:54'?
tracking_grants_for_research
select count(*) from project_staff where role_code = 'leader' or date_from < '1989-04-24 23:51:54'
Question: how many project members were leaders or started working before '1989-04-24 23:51:54'? | Tables: 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_amou...
how many project members were leaders or started working before '1989-04-24 23:51:54'?
tracking_grants_for_research
select date_to from project_staff order by date_to desc limit 1
Question: what is the last date of the staff leaving the projects? | Tables: 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_en...
what is the last date of the staff leaving the projects?
tracking_grants_for_research
select date_to from project_staff order by date_to desc limit 1
Question: what is the last date that a staff member left a project? | Tables: 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_e...
what is the last date that a staff member left a project?
tracking_grants_for_research
select t1.outcome_description from research_outcomes as t1 join project_outcomes as t2 on t1.outcome_code = t2.outcome_code join projects as t3 on t2.project_id = t3.project_id where t3.project_details = 'sint'
Question: what are the result description of the project whose detail is 'sint'? | Tables: 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_...
what are the result description of the project whose detail is 'sint'?
tracking_grants_for_research
select t1.outcome_description from research_outcomes as t1 join project_outcomes as t2 on t1.outcome_code = t2.outcome_code join projects as t3 on t2.project_id = t3.project_id where t3.project_details = 'sint'
Question: what is the description for the results whose project detail is 'sint'? | Tables: 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...
what is the description for the results whose project detail is 'sint'?
tracking_grants_for_research
select t1.organisation_id , count(*) from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.organisation_id order by count(*) desc limit 1
Question: list the organisation id with the maximum outcome count, and the count. | Tables: 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...
list the organisation id with the maximum outcome count, and the count.
tracking_grants_for_research
select t1.organisation_id , count(*) from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.organisation_id order by count(*) desc limit 1
Question: what is the id of the organization with the maximum number of outcomes and how many outcomes are there? | Tables: 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, organisati...
what is the id of the organization with the maximum number of outcomes and how many outcomes are there?
tracking_grants_for_research
select project_details from projects where organisation_id in ( select organisation_id from projects group by organisation_id order by count(*) desc limit 1 )
Question: list the project details of the projects launched by the organisation | Tables: 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_d...
list the project details of the projects launched by the organisation
tracking_grants_for_research
select project_details from projects where organisation_id in ( select organisation_id from projects group by organisation_id order by count(*) desc limit 1 )
Question: what are the details for the projects which were launched by the organization with the most projects? | Tables: 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...
what are the details for the projects which were launched by the organization with the most projects?
tracking_grants_for_research
select staff_details from research_staff order by staff_details asc
Question: list the research staff details, and order in ascending order. | Tables: 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, gr...
list the research staff details, and order in ascending order.
tracking_grants_for_research
select staff_details from research_staff order by staff_details asc
Question: what details are there on the research staff? list the result in ascending alphabetical order. | Tables: 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, gr...
what details are there on the research staff? list the result in ascending alphabetical order.
tracking_grants_for_research
select count(*) from tasks
Question: how many tasks are there in total? | Tables: 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....
how many tasks are there in total?
tracking_grants_for_research
select count(*) from tasks
Question: how many tasks are there? | Tables: 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. Organisa...
how many tasks are there?
tracking_grants_for_research
select count(*) , t1.project_details from projects as t1 join tasks as t2 on t1.project_id = t2.project_id group by t1.project_id
Question: how many tasks does each project have? list the task count and the project detail. | Tables: 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, ...
how many tasks does each project have? list the task count and the project detail.
tracking_grants_for_research
select count(*) , t1.project_details from projects as t1 join tasks as t2 on t1.project_id = t2.project_id group by t1.project_id
Question: for each project id, how many tasks are there? | Tables: 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, ot...
for each project id, how many tasks are there?
tracking_grants_for_research
select role_code from project_staff where date_from > '2003-04-19 15:06:20' and date_to < '2016-03-15 00:33:18'
Question: what are the staff roles of the staff who | Tables: 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_d...
what are the staff roles of the staff who
tracking_grants_for_research
select role_code from project_staff where date_from > '2003-04-19 15:06:20' and date_to < '2016-03-15 00:33:18'
Question: what roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'? | Tables: 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_...
what roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?
tracking_grants_for_research
select t1.outcome_description from research_outcomes as t1 join project_outcomes as t2 on t1.outcome_code = t2.outcome_code
Question: what are the descriptions of all the project outcomes? | Tables: 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_...
what are the descriptions of all the project outcomes?
tracking_grants_for_research
select t1.outcome_description from research_outcomes as t1 join project_outcomes as t2 on t1.outcome_code = t2.outcome_code
Question: list the description of the outcomes for all projects. | Tables: 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_...
list the description of the outcomes for all projects.
tracking_grants_for_research
select role_code from project_staff group by role_code order by count(*) desc limit 1
Question: which role is most common for the staff? | Tables: 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_de...
which role is most common for the staff?
tracking_grants_for_research
select role_code from project_staff group by role_code order by count(*) desc limit 1
Question: what is the most common role for the staff? | Tables: 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...
what is the most common role for the staff?
network_2
select count(t2.friend) from person as t1 join personfriend as t2 on t1.name = t2.name where t1.name = 'dan'
Question: how many friends does dan have? | Tables: Person -> name, age, city, gender, job. PersonFriend -> name, friend, year. | Joins: PersonFriend.friend = Person.name, PersonFriend.name = Person.name,
how many friends does dan have?
network_2
select count(t2.friend) from person as t1 join personfriend as t2 on t1.name = t2.name where t1.name = 'dan'
Question: how many friends does dan have? | Tables: Person -> name, age, city, gender, job. PersonFriend -> name, friend, year. | Joins: PersonFriend.friend = Person.name, PersonFriend.name = Person.name,
how many friends does dan have?