I've a requirement where I want to show the count of customers shopping in two particular formats.
For eg.:
According to this image :
The count of customers shopping in Format A alone is 10.
The count of customers shopping in Format A and B is 20.
The count of customers shopping in Format A and C is 30.
So on and so forth.
I've written the query which gives me output like :
(Select distinct a.Mobile, a.Format_desc, b.Format_desc from (Select distinct Mobile,Format_desc from hadmin.Sum_rpo_item_sales a, Hadmin.S_Site_master b where a.storE_no=b.store_no and format_Cd between 545 and 561)a, (Select distinct Mobile,Format_desc from hadmin.Sum_rpo_item_sales a, Hadmin.S_Site_master b where a.storE_no=b.store_no and format_Cd between 545 and 561)b where a.Mobile=b.Mobile);
What can be the further step to achieve a result that I've attached in the first img ?