| GroupAggregate (cost=107.24..107.26 rows=1 width=44) |
| Group Key: s.id |
| -> Sort (cost=107.24..107.25 rows=1 width=40) |
| Sort Key: s.id |
| -> Nested Loop Left Join (cost=0.14..107.23 rows=1 width=40) |
| -> Seq Scan on tbl_pre_sales ps (cost=0.00..99.00 rows=1 width=12) |
| Filter: ((NOT is_draft) AND (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 (created_by = 1001)) |
| -> Index Scan using tbl_services_pkey on tbl_services s (cost=0.14..8.16 rows=1 width=36) |
| Index Cond: (ps.service_id = id) |