Author |
Message |
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 23360 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, July 24, 2013 - 6:12 pm: |
|
Symbol_of_king:
thanks bhayya..it worked |
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 23359 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, July 24, 2013 - 5:20 pm: |
|
Symbol_of_king:
thnaks thammi...aagu check chesthunna.. |
Symbol_of_king
Kurra Bewarse Username: Symbol_of_king
Post Number: 2121 Registered: 12-2005 Posted From: 70.192.193.239
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, July 24, 2013 - 5:15 pm: |
|
select company,activity ? first_value(activity) over (partition by company order by activity desc) updt_activity, sum(amount) over (partition by company) updt_amount from table_XYZ Something similar to above should work...fyi..i am not 100% sure. |
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 23354 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, July 24, 2013 - 4:46 pm: |
|
Bignole:
chinchuthunna..inka raaledu..manollu evaranna septharemo chodali.. |
Bignole
Mudiripoyina Bewarse Username: Bignole
Post Number: 23963 Registered: 03-2004 Posted From: 148.87.67.212
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, July 24, 2013 - 4:42 pm: |
|
answer nuvve seppeyyi Tmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
|
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 23353 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, July 24, 2013 - 4:42 pm: |
|
I have a sql query that returns the data like this. company active activityinperiod amount 10 Y N 100 10 N N 200 10 Y Y 300 For a given company, I want only record with the sum of amounts as shown below. 10 Y Y 600 Since the activity has Y, I wany the column value as Y. If all the rows values has N, then I want that to show N. Same is the case with Activityperiod. How can I achieve this? |