If have following data set:

SQL> select * from t;

WAC WAM PRICE PRODUCT
---------- ---------- ---------- ----------
10 5 100 long
11 4 99 long
14 7 97 long
15 3 101 long
15 9 99 long
21 4 98 long
21 7 102 long
25 8 104 long
12 4 102 long
5 2 100 long
5 8 101 long
5 10 98 long
9 5 102 long

And a sql query:
----------------
Select
count(wac) over (partition by wac order by wac) wac_count1,
wac,
lead(wac, 1) over (order by wac) next_wac
From t;

This qry gives following result:

WAC_COUNT1 WAC NEXT_WAC
---------- ---------- ----------
3 5 5
3 5 5
3 5 9
1 9 10
1 10 11
1 11 12
1 12 14
1 14 15
2 15 15
2 15 21
2 21 21
2 21 25
1 25

I have the count for wac in column wac_count1 in the above query, how can I get another column wac_count2 that has the count on next_wac ?

Any suggestions...!!

Thanks
Shalu