| Sort (cost=404.61..404.73 rows=46 width=41) |
| Sort Key: (COALESCE(sum(p.budget), '0'::numeric)) DESC |
| -> GroupAggregate (cost=402.42..403.34 rows=46 width=41) |
| Group Key: c.name |
| -> Sort (cost=402.42..402.54 rows=46 width=14) |
| Sort Key: c.name |
| -> Hash Join (cost=199.73..401.15 rows=46 width=14) |
| Hash Cond: (p.from_contact = c.id) |
| -> Seq Scan on tbl_projects p (cost=0.00..201.30 rows=46 width=9) |
| Filter: ((created_at >= '2026-01-01 00:00:00+08'::timestamp with time zone) AND (created_at <= '2026-12-31 23:59:59+08'::timestamp with time zone) AND (project_status = 3)) |
| -> Hash (cost=139.88..139.88 rows=4788 width=13) |
| -> Seq Scan on tbl_contacts c (cost=0.00..139.88 rows=4788 width=13) |