QUERY PLAN
Aggregate (cost=271.33..271.34 rows=1 width=32)
-> Hash Join (cost=200.47..269.15 rows=870 width=6)
Hash Cond: (c.from_project = p.id)
-> Seq Scan on tbl_sales_contracts c (cost=0.00..64.37 rows=1637 width=10)
-> Hash (cost=180.19..180.19 rows=1623 width=4)
-> Seq Scan on tbl_projects p (cost=0.00..180.19 rows=1623 width=4)
Filter: (project_status = 3)