hi,

first of all u ve not mentioned the version currently u r working with...but i can give u the solution on oracle 8.0.5.

say u have 2 colums slno, total

SQLWKS> select * from test
2>
SLNO TOTAL
---------- ----------
1 10
1 10
2 5
3 10
3 10

5 Rows Selected

--query

select (select count(bb) from(select count(slno) bb from test group by slno)) count,
bb total
from
(select
sum(total) bb
from
test
where
rowid in (select max(rowid) from test
group by slno)
)


--output

COUNT TOTAL
---------- ----------
3 25

1 Row Selected..