QUERY PLAN
Aggregate (cost=281.72..281.73 rows=1 width=72)
-> Hash Join (cost=258.17..281.02 rows=40 width=46)
Hash Cond: (pas.project_id = p.id)
-> HashAggregate (cost=60.87..73.27 rows=827 width=36)
Group Key: pas.project_id
Filter: (sum(pas.contribution) IS NOT NULL)
-> Seq Scan on tbl_project_architects pas (cost=0.00..54.33 rows=872 width=8)
Filter: ((engineer_id = ANY ('{1017,5085,1001,5248,1015,1022,5296,1023}'::integer[])) AND (engineer_id = ANY ('{1017,5085,1001,5248,1015,1022,5296,1023}'::integer[])))
-> Hash (cost=195.46..195.46 rows=147 width=14)
-> Seq Scan on tbl_projects p (cost=0.00..195.46 rows=147 width=14)
Filter: ((bargain_date >= '2025-01-01'::date) AND (bargain_date < '2026-01-01 00:00:00'::timestamp without time zone) AND (project_status = 3))