Problem:

I need to aggregate the price on a table by certain values so i do

```
select t.r as score_range, count(*) as number_of_occurences
from (
  select case  
    when publicsellingprice between 0 and 5000 then ' 0-5k'
    when publicsellingprice between 5000 and 10000 then '5-10k'
    when publicsellingprice between 10000 and 20000 then '10-20k'
    when publicsellingprice between 20000 and 400000 then '20-40k'
    when publicsellingprice between 40000 and 80000 then '40-80k'   
    else '80-999K' end as r
  from product) t
group by t.r
order by 1

```

This works no problem. If i test this with values only from 5-k it displays only that row;
what i want is to have always the full 5 rows of data and when there is no values for the given conditions i want 0 or null or something else. How can i achieve this?