February 17, 2015 at 3:53 pm
Hi,
Below is the My Table data...
Type User Name region duration1 duration2 dails Math Silver Gold
A Ramesh Section01 892 1742 40 1 3 103
B Naresh Section01 0 0 0 0 0 8
B Singh Section01 0 3003 120 0 2 26
B Kanth Section01 359 1261 52 1 0 13
B Peter Section01 1716 3230 173 0 1 28
Total Section01-Total 2967 9236 385 1 3 103
Above From Duration1(Calculating type of A+B),Duration2(Calculating type of A+B),Dials(Calculating Type of A+B)
But Math,Silver,Gold I need to Calculate of Type A.
I need to get The Total Like above out put.
Help me,
Thanks
February 23, 2015 at 2:35 pm
Try this..
Select sum(Duration1) as Duration1,Sum(Duration2)as Duration2,
Sum(Duration3) as Duration3, Case When Type = A then Math END as Math, Case When Type = A then Silver END as Silver
From Table
where Type in ('A','B')
Thanks,
Chinna
Its the Journey which gives you Happiness not the Destination-- Dan Millman
February 23, 2015 at 8:17 pm
suresh0534 (2/17/2015)
Hi,Below is the My Table data...
Type User Name region duration1 duration2 dails Math Silver Gold
A Ramesh Section01 892 1742 40 1 3 103
B Naresh Section01 0 0 0 0 0 8
B Singh Section01 0 3003 120 0 2 26
B Kanth Section01 359 1261 52 1 0 13
B Peter Section01 1716 3230 173 0 1 28
Total Section01-Total 2967 9236 385 1 3 103
Above From Duration1(Calculating type of A+B),Duration2(Calculating type of A+B),Dials(Calculating Type of A+B)
But Math,Silver,Gold I need to Calculate of Type A.
I need to get The Total Like above out put.
Help me,
Thanks
Just a suggestion... It took almost a week before someone responded to your problem. Please see the first link under "Helpful Links" in my signature line below for what the problem may have been and how to solve it in the future.
--Jeff Moden
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply