Loading time tracking from Teamleader Focus

I have one more strange situation. The invoice tables load correctly, but the timetracking table only loads 18 rows, while it should be a few thousand for the given date filter.

I can’t figure out the logic in it. The rows seem to be random. Different months, different users, etc.

Below is what the live monitoring shows after an apparently successful processing of the request.

And here, for confirmation, is the current SQL statement:

create or replace force view TimeTrackingAllThisYear
as
select *
from Teamleader.V2Flat.TimeTrackingAll
where ended_at >= trunc(sysdateutc, -2)
and ended_at < add_months(trunc(sysdateutc, -2), 12)

According to the number of API calls on the screen, approximately 575 x 100 = 57,500 rows were retrieved, of which 18 remained after filtering.

The recommendation is to check the operation of the view in the UniversalSQL Editor and make corrections.

This question has been automatically closed after 1 week of inactivity. The last given answer has been marked as the solution.

Please ask a new question in a separate topic if the issue occurs again. In the new question, please include a link to this topic by pasting its URL into the text.