QUERY PLAN
HashAggregate (cost=591.69..591.98 rows=23 width=36)
Group Key: ca.engineer_id
-> Hash Join (cost=336.14..590.45 rows=248 width=12)
Hash Cond: (ca.case_id = c.id)
-> Seq Scan on tbl_case_assignments ca (cost=0.00..239.41 rows=5670 width=16)
Filter: (engineer_id = ANY ('{5085,5248,1015,1022,5064,1023}'::integer[]))
-> Hash (cost=331.47..331.47 rows=374 width=4)
-> Seq Scan on tbl_cases c (cost=0.00..331.47 rows=374 width=4)
Filter: ((closed_at >= '2025-07-19 00:00:00+08'::timestamp with time zone) AND (closed_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND (case_type = 2))