| Aggregate (cost=117.87..117.88 rows=1 width=720) |
| -> Nested Loop Left Join (cost=93.40..117.52 rows=1 width=11) |
| -> Nested Loop Left Join (cost=93.12..109.22 rows=1 width=13) |
| -> Nested Loop (cost=92.84..100.91 rows=1 width=13) |
| -> GroupAggregate (cost=92.56..92.58 rows=1 width=12) |
| Group Key: subpsl.project_id |
| Filter: ((min(subpsl.id) IS NOT NULL) AND (max(subpsl.id) IS NOT NULL)) |
| -> Sort (cost=92.56..92.56 rows=1 width=8) |
| Sort Key: subpsl.project_id |
| -> Seq Scan on tbl_project_status_logs subpsl (cost=0.00..92.55 rows=1 width=8) |
| Filter: ((created_at >= '2026-06-09 00:00:00+08'::timestamp with time zone) AND (created_at < '2026-06-10 00:00:00'::timestamp without time zone)) |
| -> Index Scan using tbl_projects_pkey on tbl_projects p (cost=0.28..8.31 rows=1 width=9) |
| Index Cond: (id = subpsl.project_id) |
| Filter: (created_by = ANY ('{1001,1004,1005,1013,5087,5295,5300,5311,5332,5449,5467,5476}'::integer[])) |
| -> Index Scan using tbl_project_status_logs_pkey on tbl_project_status_logs minpsl (cost=0.28..8.30 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.28..8.30 rows=1 width=6) |
| Index Cond: ((max(subpsl.id)) = id) |