QUERY PLAN
Aggregate (cost=262.83..262.84 rows=1 width=72)
-> Hash Join (cost=252.68..262.70 rows=7 width=46)
Hash Cond: (pas.project_id = p.id)
-> HashAggregate (cost=50.62..56.07 rows=363 width=36)
Group Key: pas.project_id
Filter: (sum(pas.contribution) IS NOT NULL)
-> Seq Scan on tbl_project_architects pas (cost=0.00..47.85 rows=370 width=8)
Filter: ((engineer_id = ANY ('{5085,5248,1015,1022,5064,1023}'::integer[])) AND (engineer_id = ANY ('{5085,5248,1015,1022,5064,1023}'::integer[])))
-> Hash (cost=201.30..201.30 rows=60 width=14)
-> Seq Scan on tbl_projects p (cost=0.00..201.30 rows=60 width=14)
Filter: ((bargain_date >= '2026-01-01'::date) AND (bargain_date < '2027-01-01 00:00:00'::timestamp without time zone) AND (project_status = 3))