Posts by Serginho Paschoal • 79 points
2 posts
-
3
votes3
answers438
viewsA: Over with Group by
Through the Tips I solved this way, in the tests seems correct result: SELECT c.mes, c.credito, c.debito, d.saldo, c.emp_id FROM viewfluxo AS c INNER JOIN (SELECT a.mes, SUM(b.credito - b.debito) AS…
-
4
votes3
answers438
viewsQ: Over with Group by
I have a query that I use to return me as an extract, accumulating the values record by record: SELECT TOP (100) PERCENT Mes, Credito, Debito, Sum(Credito - Debito) over (ORDER BY Emp_id, Mes) AS…