> what im trying to do is have a Sum of a colum.. as it goes forwards
I don't think this is what you want, but I suppose it might help....
Table = simple
+----------------------------------+----------------------------------+-----
--+
| Field | Type |
Length|
+----------------------------------+----------------------------------+-----
--+
| price | int4 |
4 |
+----------------------------------+----------------------------------+-----
--+
=> select price,count(price) from simple group by price;
price|count
-----+-----
1| 4
2| 7
4| 8
5| 5
7| 16
9| 1
10| 12
(7 rows)
=> create view simple_v as select price,count(price) from simple group by
price;
CREATE 19503 1
=> select * from simple_v;
price|count
-----+-----
1| 4
2| 7
4| 8
5| 5
7| 16
9| 1
10| 12
(7 rows)
=> insert into simple (price) values (5);
INSERT 19504 1
=> select * from simple_v;
price|count
-----+-----
1| 4
2| 7
4| 8
5| 6
7| 16
9| 1
10| 12
(7 rows)