How tasks are there?
select count(*) from tasks;
How many tasks does each project have?
select count(*) from projects as t1 join tasks as t2 on t1.project_id = t2.project_id group by t1.project_id;
Show the project details as well.
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;