My query
select state,count(*) from crm_lead group by state;
which return
state count
done 794
open 560
pending 3
draft 8
cancel 1
but sometime when I have no ‘cancel’ task in my table
state count
done 794
open 560
pending 4
draft 8
I would like to include count = 0 in the result, what is the best query ?
1 Answer