Get first and last record

can anybody help me?

I have two tables in my app.

I need the first value of “saldo_inicial” and the last “saldo_atual” result from the table “apostas_matheus” where “mes” and “ano” are equal to the “lucro_mensal” table (“mes” and “ano”).
I will subtract both to get my monthly profit

And would this be the best way? Thank you very much

2 Likes

Mr. Steve!

Thank you very much!

On target, exactly what I needed.

thank you very much again.

1 Like