Skip to Content
0
Jul 15, 2008 at 07:24 AM

Exception Aggregation

95 Views

hi all,

i have a query whose output is as follows.

Ccode |Bus entity | Building | Year | Area

cc1 | be1 | b1 |1956 | 100 *

cc1 | be1 | b1 |1957 | 100

cc2 | be2 | b2 |1958 | 200 *

cc3 | be3 | b3 |1959 | 300 *

cc3 | be3 | b3 |1960 | 300

cc4 | be4 | b4 |1961 | 400 *

result -


1400

now i want the total for area, for which i should consider the combination of Ccode, Bus entity and building only one time. i.e the area for a particular building corresponding to a ccode and busentity should be considered only once.. no matter how many times it appears in the output.

i.e i should get the total area as 1000 but not as 1400.

how can i achieve this..

thanks in advance..