QUERY PLAN
Aggregate (cost=308.02..308.03 rows=1 width=8)
-> Sort (cost=308.00..308.00 rows=1 width=167)
Sort Key: tbl_work_logs.created_at DESC
-> Bitmap Heap Scan on tbl_work_logs (cost=5.02..307.99 rows=1 width=167)
Recheck Cond: (created_by = 5064)
Filter: ((created_at >= '2025-01-01 00:00:00+08'::timestamp with time zone) AND (created_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND (status = '-1'::integer))
-> Bitmap Index Scan on tbl_work_logs_created_by_idx (cost=0.00..5.02 rows=97 width=0)
Index Cond: (created_by = 5064)