Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 23353 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 | 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? |