QUERY PLAN
HashAggregate (cost=7.42..7.50 rows=8 width=4)
Group Key: s.created_by
-> Hash Join (cost=3.19..7.40 rows=8 width=4)
Hash Cond: (s.id = ccr.punch_leave_id)
-> Seq Scan on tbl_punch_leaves s (cost=0.00..3.22 rows=122 width=8)
-> Hash (cost=3.09..3.09 rows=8 width=4)
-> Seq Scan on tbl_punch_leave_carbon_copy_rels ccr (cost=0.00..3.09 rows=8 width=4)
Filter: (user_id = 1001)