What are all the contract ids
select maintenance_contract_id from maintenance_contracts
Can I also get the numbers of assets for each of these contracts
select t1.maintenance_contract_id, t2.asset_id from maintenance_contracts as t1 join assets as t2 on t1.maintenance_contract_id = t2.maintenance_contract_id
What I meant was the asset counts for each of these contracts
select count ( * ), t1.maintenance_contract_id from maintenance_contracts as t1 join assets as t2 on t1.maintenance_contract_id = t2.maintenance_contract_id group by t1.maintenance_contract_id