I have a query similar to this one on the grid, select count(MemberNo) as MemberCount , sum(SalaryAmount) as TotalAmount, ProvinceID from xxxxx group by ProvinceID
I would like to add RegionID, BranchID after ProvinceID in the select part and in the group by part dynamically so that the query looks like select count(MemberNo) as MemberCount , sum(SalaryAmount) as TotalAmount, ProvinceID,RegionID,BranchID from xxxxx group by ProvinceID,RegionID,BranchID
how do I achieve this.