| Aggregate (cost=2598.14..2598.15 rows=1 width=8) |
| -> HashAggregate (cost=2554.39..2573.84 rows=1944 width=4) |
| Group Key: tbl_work_logs.client_id |
| -> Append (cost=0.00..2549.53 rows=1944 width=4) |
| -> Seq Scan on tbl_work_logs (cost=0.00..1890.99 rows=1939 width=4) |
| Filter: ((NOT is_draft) AND (client_id IS NOT NULL) AND (start_at >= '2025-01-01 00:00:00+08'::timestamp with time zone) AND (start_at <= '2025-12-31 00:00:00+08'::timestamp with time zone)) |
| -> Seq Scan on tbl_schedules (cost=0.00..639.10 rows=5 width=4) |
| Filter: ((NOT is_closed) AND (client_id IS NOT NULL) AND (start_at >= '2025-01-01 00:00:00+08'::timestamp with time zone) AND (start_at <= '2025-12-31 00:00:00+08'::timestamp with time zone)) |