Hi All,
I got the solution:
Select Type,Sum(Count)Count,0 as sales From (select Type,Count from #test unpivot(Count for Type in([cropcnt],[SeedCnt])) as upvt1)b
Group by Type
union all
Select Type,0 as Count,Sum(Sales)Sales From (select Type,sales from #test unpivot(Sales for Type in([RetSales],DisSales)) as upvt1)b
Group by Type