I have query which is working fine but not showing range of the count is zero
Here is mysql query
select
case
when hotel_offer_price between 0 and 5000 then '0-5000'
when hotel_offer_price between 5000 and 10000 then '5000-10000'
when hotel_offer_price between 10000 and 15000 then '10000-15000'
when hotel_offer_price between 15000 and 20000 then '15000-20000' else '20000'
end as `Range`,
count(1) as `Count`
from hotel_search_results
where uniquerefno = 'SH240709VUWJWXUXUZUIJXB104411'
group by `Range`;
This query is working and getting results like
Range | Count |
---|---|
0-5000 | 37 |
10000-15000 | 9 |
5000-10000 | 54 |
I am expecting result like
Range | Count |
---|---|
0-5000 | 37 |
5000-10000 | 54 |
10000-15000 | 9 |
15000-20000 | 0 |
20000 | 0 |