Topics Topics Help/Instructions Help Edit Profile Profile Member List Register Paatha Gnyapakaalu - Archives from Old DB  
Search New Posts 1 | 2 | 8 Hours Search New Posts 1 | 3 | 7 Days Search Search Tree View Tree View Latest tweets Live Tweets   Hide Images
Bewarse Talk Discussion Board * Archives - 2013 * Cine Talk - Reviews, Gossips, Insider Info etc. * Archive through July 30, 2013 * SQL Quety Help < Previous Next >

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this 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:    Edit Post Delete Post Print Post


Symbol_of_king:




thanks bhayya..it worked :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post


Symbol_of_king:




thnaks thammi...aagu check chesthunna..
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post

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.
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post


Bignole:




chinchuthunna..inka raaledu..manollu evaranna septharemo chodali..
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post

answer nuvve seppeyyi
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post

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?

Topics | Last Hour | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration