QUERY PLAN
Aggregate (cost=225.79..225.80 rows=1 width=8)
-> Nested Loop (cost=0.00..225.79 rows=1 width=4)
Join Filter: (otc.operation_task_id = ot.id)
-> Seq Scan on tbl_operation_task_contacts otc (cost=0.00..219.53 rows=1 width=8)
Filter: ((complete_at >= '2025-07-03 00:00:00+08'::timestamp with time zone) AND (complete_at <= '2025-07-03 23:59:59+08'::timestamp with time zone))
-> Seq Scan on tbl_operation_tasks ot (cost=0.00..6.12 rows=11 width=4)
Filter: (head_of = ANY ('{1001,1004,1005,1013,5087,5295,5300,5311,5329,5332,5420}'::integer[]))