QUERY PLAN
Aggregate (cost=331.95..331.96 rows=1 width=32)
-> Hash Join (cost=206.84..329.63 rows=928 width=6)
Hash Cond: (c.from_project = p.id)
-> Seq Scan on tbl_sales_contracts c (cost=0.00..118.25 rows=1725 width=10)
-> Hash (cost=185.55..185.55 rows=1703 width=4)
-> Seq Scan on tbl_projects p (cost=0.00..185.55 rows=1703 width=4)
Filter: (project_status = 3)