| Aggregate (cost=54.27..54.28 rows=1 width=720) |
| -> Nested Loop Left Join (cost=33.98..53.92 rows=1 width=38) |
| -> Nested Loop Left Join (cost=33.82..49.75 rows=1 width=40) |
| -> Nested Loop (cost=33.67..45.57 rows=1 width=40) |
| Join Filter: (p.id = subpsl.project_id) |
| -> GroupAggregate (cost=33.67..33.87 rows=8 width=12) |
| Group Key: subpsl.project_id |
| Filter: ((min(subpsl.id) IS NOT NULL) AND (max(subpsl.id) IS NOT NULL)) |
| -> Sort (cost=33.67..33.69 rows=8 width=8) |
| Sort Key: subpsl.project_id |
| -> Seq Scan on tbl_project_status_logs subpsl (cost=0.00..33.55 rows=8 width=8) |
| Filter: ((created_at >= '2026-05-29 00:00:00+08'::timestamp with time zone) AND (created_at < '2026-05-30 00:00:00'::timestamp without time zone)) |
| -> Materialize (cost=0.00..11.38 rows=2 width=36) |
| -> Seq Scan on tbl_projects p (cost=0.00..11.38 rows=2 width=36) |
| Filter: (created_by = ANY ('{5493,5493}'::integer[])) |
| -> Index Scan using tbl_project_status_logs_pkey on tbl_project_status_logs minpsl (cost=0.15..4.17 rows=1 width=8) |
| Index Cond: ((min(subpsl.id)) = id) |
| -> Index Scan using tbl_project_status_logs_pkey on tbl_project_status_logs maxpsl (cost=0.15..4.17 rows=1 width=6) |
| Index Cond: ((max(subpsl.id)) = id) |