Database: assets_maintenance
Question: How many assets does each maintenance contract contain? List the number and the contract id.
SQL:
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