Which project hires the most staffs?
select project_id from project_staff group by project_id order by count(*) desc limit 1;
Who's the leader of this project? Show me the id.
select staff_id 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';
What's his from-date and to-date of working?
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';