Anonymous
public text v1 · immutablemy query is:
select region_id,product_id,contract_type_id,no_of_mon,
count (case when no_of_mon=1 then cust_cod end),
count (case when no_of_mon=1 and c_type='P' then cust_cod end),
count (case when no_of_mon=1 and c_type='N' then cust_cod end),
0 as others from churn1 where no_of_mon=1 group by region_id,product_id,contract_type_id,no_of_mon;
by using this query i can dig the values for month 1. i need a query which can dig the values for 1 to 12 months.