QUERY PLAN
Aggregate (cost=399.36..399.37 rows=1 width=72)
-> Hash Join (cost=377.36..399.32 rows=2 width=46)
Hash Cond: (pas.project_id = p.id)
-> HashAggregate (cost=53.10..65.03 rows=795 width=36)
Group Key: pas.project_id
Filter: (sum(pas.contribution) IS NOT NULL)
-> Seq Scan on tbl_project_architects pas (cost=0.00..46.83 rows=837 width=8)
Filter: ((engineer_id = ANY ('{1017,5085,5248,1015,1022,1023}'::integer[])) AND (engineer_id = ANY ('{1017,5085,5248,1015,1022,1023}'::integer[])))
-> Hash (cost=324.15..324.15 rows=8 width=14)
-> Seq Scan on tbl_projects p (cost=0.00..324.15 rows=8 width=14)
Filter: ((bargain_date >= '2025-08-01'::date) AND (bargain_date < '2025-09-01 00:00:00'::timestamp without time zone) AND (project_status = 3))