QUERY PLAN
HashAggregate (cost=128.78..129.57 rows=79 width=44)
Group Key: s.id
-> Hash Left Join (cost=17.18..128.38 rows=79 width=40)
Hash Cond: (ps.service_id = s.id)
-> Seq Scan on tbl_pre_sales ps (cost=0.00..111.00 rows=79 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 = ANY ('{1017,5085,1001,5248,1015,1022,5296,1023}'::integer[])))
-> Hash (cost=14.30..14.30 rows=230 width=36)
-> Seq Scan on tbl_services s (cost=0.00..14.30 rows=230 width=36)