QUERY PLAN
GroupAggregate (cost=47.31..47.35 rows=1 width=76)
Group Key: u.id
-> Sort (cost=47.31..47.32 rows=1 width=22)
Sort Key: u.id
-> Nested Loop (cost=9.89..47.30 rows=1 width=22)
-> Hash Join (cost=9.61..39.83 rows=10 width=12)
Hash Cond: (pa.engineer_id = u.id)
-> Seq Scan on tbl_project_architects pa (cost=0.00..26.34 rows=1434 width=12)
-> Hash (cost=9.60..9.60 rows=1 width=4)
-> Seq Scan on tbl_users u (cost=0.00..9.60 rows=1 width=4)
Filter: ((id = ANY ('{5085,5248,1015,1022,5064,1023}'::integer[])) AND (id = ANY ('{5085,5248,1015,1022,5064,1023}'::integer[])))
-> Index Scan using tbl_projects_pkey on tbl_projects p (cost=0.28..0.75 rows=1 width=14)
Index Cond: (id = pa.project_id)
Filter: ((bargain_date >= '2026-01-01'::date) AND (bargain_date < '2027-01-01 00:00:00'::timestamp without time zone) AND (project_status = 3))