QUERY PLAN
Aggregate (cost=262.29..262.30 rows=1 width=72)
-> Hash Join (cost=252.43..262.18 rows=6 width=46)
Hash Cond: (pas.project_id = p.id)
-> HashAggregate (cost=50.40..55.70 rows=353 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.70 rows=360 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.37..201.37 rows=53 width=14)
-> Seq Scan on tbl_projects p (cost=0.00..201.37 rows=53 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))