QUERY PLAN
Aggregate (cost=92.51..92.52 rows=1 width=8)
-> Sort (cost=92.49..92.50 rows=1 width=324)
Sort Key: p.is_draft DESC, p.has_following_work DESC, p.end_at DESC
-> Group (cost=92.47..92.48 rows=1 width=324)
Group Key: p.id
-> Sort (cost=92.47..92.48 rows=1 width=14)
Sort Key: p.id
-> Seq Scan on tbl_pre_sales p (cost=0.00..92.46 rows=1 width=14)
Filter: (case_id = 9262)