| Sort (cost=208.33..208.34 rows=1 width=41) |
| Sort Key: (COALESCE(sum(p.budget), '0'::numeric)) DESC |
| -> GroupAggregate (cost=208.30..208.32 rows=1 width=41) |
| Group Key: c.name |
| -> Sort (cost=208.30..208.30 rows=1 width=14) |
| Sort Key: c.name |
| -> Nested Loop (cost=0.28..208.29 rows=1 width=14) |
| -> Seq Scan on tbl_projects p (cost=0.00..199.99 rows=1 width=9) |
| Filter: ((created_at >= '2026-05-29 00:00:00+08'::timestamp with time zone) AND (created_at <= '2026-05-29 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..8.30 rows=1 width=13) |
| Index Cond: (id = p.from_contact) |