We would like to convert the following MySQL query to Slick. Is it possible? I couldn't find an example with `SET` or `running total anywhere`.
Select some elements from OldTransactions and add a balance column with running total. From the result select a specific transaction by transaction id and show the balance at that point.
SET @runtot =0;
SELECT balance
FROM (SELECT clno,
acno1,
( @runtot := @runtot + r.amount ) AS balance
FROM (SELECT *
FROM oldtransactions
WHERE ( acno1 = ''
OR acno2 = '' )) AS t
ORDER BY trtime ASC) AS final
WHERE tt_id = '123'