| Sort (cost=276.91..276.93 rows=10 width=41) |
| Sort Key: (COALESCE(sum(p.budget), '0'::numeric)) DESC |
| -> GroupAggregate (cost=276.54..276.74 rows=10 width=41) |
| Group Key: c.name |
| -> Sort (cost=276.54..276.56 rows=10 width=14) |
| Sort Key: c.name |
| -> Nested Loop (cost=0.28..276.37 rows=10 width=14) |
| -> Seq Scan on tbl_projects p (cost=0.00..201.37 rows=10 width=9) |
| Filter: ((created_at >= '2026-04-01 00:00:00+08'::timestamp with time zone) AND (created_at <= '2026-06-30 23:59:59+08'::timestamp with time zone) AND (project_status = 3)) |
| -> Index Scan using tbl_contacts_pkey on tbl_contacts c (cost=0.28..7.50 rows=1 width=13) |
| Index Cond: (id = p.from_contact) |