Let say i am department store manager, and i need to count sales from different store A.B C and D.
the code is something like
select
"Sales" as V1,
count(distinct case when XXX) as V1,
count(distinct case when XXX) as V2,
count(distinct case when XXX) as V3,
from sales_data
group by store;
but in the current sales dataset, there is only data for store A, and B so far and the output above will only have a row for store A and B but not C and D. how do i make output a blank row for “store” even if it doesnt exist on the dataset, so it alway output for every store?
thanks
i know this is probably pretty basic, but i tried googling around, and cant find anything
KevinC is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.