Posts by Sidinei Beza Scheffer • 1 point
1 post
-
-1
votes1
answer27
viewsQ: I need to recover the sum of the highest values of each month
SELECT SUM(valor_parametros) FROM (SELECT valor_parametros,cnpj,data_movimento FROM (SELECT valor_parametros,cnpj,data_movimento,id FROM movimento GROUP BY MONTH(data_movimento) ORDER BY id DESC)…