QUERY PLAN
HashAggregate (cost=6.37..6.45 rows=8 width=4)
Group Key: s.created_by
-> Hash Join (cost=2.63..6.35 rows=8 width=4)
Hash Cond: (s.id = ccr.punch_leave_id)
-> Seq Scan on tbl_punch_leaves s (cost=0.00..2.94 rows=94 width=8)
-> Hash (cost=2.53..2.53 rows=8 width=4)
-> Seq Scan on tbl_punch_leave_carbon_copy_rels ccr (cost=0.00..2.53 rows=8 width=4)
Filter: (user_id = 1001)