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
List the resident_id,details, and the count in descending order of the count
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
Tell me the count of total number of residents
select count ( * ) from residents