79. Running Balance

This advanced SQL exercise is part of the book: Advanced SQL – Practical Techniques and Use-Cases, which includes 100 day-to-day SQL challenges (and solutions), need-to-know advanced features, and key concepts.

Given a table that specifies transactions in the bank account of various clients. Each row specifies the transaction date, client number, client name, transaction type (D indicates Deposit and W indicates Withdraw), and the transaction’s sum.

CREATE TABLE account_actions
(a_date date,
c_id int,
c_name varchar(25),
c_action varchar(1),
c_amount int)

To read more

UpScale Analytics is one of the largest platforms in the world for learning SQL by doing, consisting over 300 SQL exercises at different levels (including solutions), by topics, across over 100 different datasets. More…