c# - aggregation result from SQL view to gridview -
i have view multi tables
account_name.......bonus..........value
customer1............a............14000
customer1............b............500
customer1............c............14500
customer2............a............20000
customer2............b............200
customer2............c............20200
http://im33.gulfup.com/nt0mm.png
how can retrieval view , show on gridview view using linq
...................a.........b..........c
customer1.......14000.......500.......14500
customer2.......20000.......200.......20200
select account_name, sum(case when bonus = 'a' value else 0 end) a, sum(case when bonus = 'b' value else 0 end) b, sum(case when bonus = 'c' value else 0 end) c youview group account_name
Comments
Post a Comment