In the following query why different results between Suitetalk rest api and Tim Dietrich's query tool? I am running under the same role in both cases.
SELECT
a.id as accountId,
SUM(tal.debit) - SUM(tal.credit) AS balance
FROM account AS a
inner JOIN transactionaccountingline AS tal ON a.id = tal.account
inner JOIN transaction AS t ON tal.transaction = t.id
WHERE a.id in (213,327, 328, 334, 345)
and t.trandate <= TO_DATE('11/07/2025', 'mm/dd/yyyy')
and t.posting = 'T' AND a.isinactive = 'F'
GROUP BY a.id
ORDER BY a.id
Result for Tim's tool:
accountid | balance |
|---|
213 | 6,318,168.04 |
327 | 2,428,042.98 |
328 | 1,820,198.39 |
334 | 42,369.63 |
345 | 666,135.86 |
result from Suitetalk rest api
213 6,284,813.54
327 3,438,235.98
328 2,897,776.35
334 0
345 495,599.25