I have a table with two columns Cust and Category,
Customer 1 has purchased from category X and Y, but for 'Category X', 3 is an exclusive customer since Cust 3 purchased only from X. I want a result like below with three columns (Category, No of Customer purchased in the category and Exclusive Customer):
**Category NoOfCust ExclusiveCust**
X 2 3
Y 2 NULL
Z 1 NULL
D 1 4
How can I query the table to get this result?