QUERY PLAN
Aggregate (cost=92.42..92.43 rows=1 width=8)
-> Sort (cost=92.40..92.41 rows=1 width=324)
Sort Key: p.is_draft DESC, p.has_following_work DESC, p.end_at DESC
-> Group (cost=92.39..92.39 rows=1 width=324)
Group Key: p.id
-> Sort (cost=92.39..92.39 rows=1 width=14)
Sort Key: p.id
-> Seq Scan on tbl_pre_sales p (cost=0.00..92.38 rows=1 width=14)
Filter: (case_id = 9260)