database table like this
============================ = suburb_id | value = 1 | 2 = 1 | 3 = 2 | 4 = 3 |
Query:
select case when total is null then 0 else total end as total_with_zeroes, suburb_id from (SELECT COUNT(suburb_id) AS total, suburb_id FROM suburbs where suburb_id IN (1,2,3,4) GROUP BY suburb_id) as dt