,sum(balance) over (partition by c.CUSTOMER_ID)
from customer c, account a
c.customer_id = a.customer_id
c.customer_id in (
balance < 0)
Message was edited by: chris227 sorry, didnt see that it was two tables. join added
here below the query, you will get output exactly as required...
SUM(b.balance) OVER (PARTITION BY a.customer_id) customer_total
FROM customer a, account b
WHERE a.customer_id = b.customer_id
ORDER BY a.customer_id, b.account_id ASC.