How many services has each resident requested?
select t1.resident_id, count ( * ) from residents as t1 join residents_services as t2 on t1.resident_id = t2.resident_id group by t1.resident_id order by count ( * ) desc
Can you list them in descending order?
select t1.resident_id, count ( * ) from residents as t1 join residents_services as t2 on t1.resident_id = t2.resident_id group by t1.resident_id order by count ( * ) desc
The resident_id and count of services
select t1.resident_id, count ( * ) from residents as t1 join residents_services as t2 on t1.resident_id = t2.resident_id group by t1.resident_id order by count ( * ) desc
Can you add the resident other detail to the results?
select t1.resident_id, t1.other_details, count ( * ) from residents as t1 join residents_services as t2 on t1.resident_id = t2.resident_id group by t1.resident_id order by count ( * ) desc