Show the ID numbers for all the different services that are available.
select distinct service_id from services
How many times has a resident service of the type 'Moving Out' been provided?
select count(*) from services as t1 join residents_services as t2 on t1.service_id = t2.service_id where service_type_code = 'Moving Out'
Which services have not been provided, if any?
select count(*) from services where service_id not in (select distinct t1.service_id from services as t1 join residents_services as t2 on t1.service_id = t2.service_id)
What is the most number of times any particular service was provided?
select count(*) from services as t1 join residents_services as t2 on t1.service_id = t2.service_id group by t1.service_id order by count(*) desc limit 1
What service was it? Show the service_id and service_details.
select t1.service_id, t1.service_details, count(*) from services as t1 join residents_services as t2 on t1.service_id = t2.service_id group by t1.service_id order by count(*) desc limit 1