QUERY PLAN
HashAggregate (cost=123.53..123.65 rows=12 width=4)
Group Key: created_by
-> Seq Scan on tbl_purchase_contracts (cost=0.00..123.40 rows=52 width=4)
Filter: (cost_type = 2)