| Sort (cost=1815.23..1815.75 rows=206 width=84) |
| Sort Key: (COALESCE(sum(r.amount), '0'::numeric)) DESC |
| -> GroupAggregate (cost=1803.20..1807.32 rows=206 width=84) |
| Group Key: tt.id |
| -> Sort (cost=1803.20..1803.71 rows=206 width=21) |
| Sort Key: tt.id |
| -> Hash Left Join (cost=315.74..1795.28 rows=206 width=21) |
| Hash Cond: (ttr.taxonomy_id = tt.id) |
| -> Hash Right Join (cost=304.83..1783.82 rows=206 width=9) |
| Hash Cond: (ttr.object_id = r.id) |
| -> Seq Scan on tbl_term_taxonomy_relationships ttr (cost=0.00..1473.24 rows=2192 width=8) |
| Filter: ((term_id = 18) AND (object_type = 7)) |
| -> Hash (cost=302.26..302.26 rows=206 width=9) |
| -> Seq Scan on tbl_reimbursements r (cost=0.00..302.26 rows=206 width=9) |
| Filter: ((occurrence_at >= '2026-01-01 00:00:00+08'::timestamp with time zone) AND (occurrence_at <= '2026-03-31 23:59:59+08'::timestamp with time zone) AND (status = ANY ('{1,2,3}'::integer[]))) |
| -> Hash (cost=7.07..7.07 rows=307 width=16) |
| -> Seq Scan on tbl_term_taxonomies tt (cost=0.00..7.07 rows=307 width=16) |