/* Accumulate numeric column from all previous rows */

SELECT vendor, description, amount, SUM(amount) OVER (ORDER BY payment_num) AS accum_total 
FROM   payment;

SELECT student_id, SUM(student_id) OVER (ORDER BY student_id) AS accum 
FROM   student;