Group by Range SQL Server -
update!!!!
i have following sql query built respective output:


i add labels each of aggregations below:
coupon percent | income level ----------------------------------- .023434355 | 0-20000 .054888999 | 20000-35000 .010000002 | 35000-100000 any suggestions?
you can add case statement group by like
group case when storeavgincome <= 20000 '0-20000' when storeavgincome > 20000 , storeavgincome <= 35000 '20000-35000' when storeavgincome > 35000 , storeavgincome <= 100000 '35000-100000' end then add same select
select case when storeavgincome <= 20000 '0-20000' when storeavgincome > 20000 , storeavgincome <= 35000 '20000-35000' when storeavgincome > 35000 , storeavgincome <= 100000 '35000-100000' end [income level]
Comments
Post a Comment