I have created the following query to select the movements, in a certain period, of a certain account (the selection is made through the field cod_conta (text [VARCHAR]).
SELECT "COD_CONTA" AS "Account", "DESC_CONTA" AS "DESC", "DESC_MOV", SUM ("DEBIT") AS "DEBIT", SUM ("CREDIT") AS "CREDIT" WHERE "DATA_MOV"> =: DATAINICIAL AND "DATA_MOV" <=: DATAFINAL GROUP BY "COD_CONTA", "DESC_CONTA", "DESC_MOV" HAVING (("COD_CONTA" =: INDIQUECONTA_A_CONSULTAR))
At first everything seemed fine, I now verify that there are certain accounts that do not appear in the selection (examples 61 and 69).
Where will I go wrong?
Thank you, from now, to whom I can help