QUERY PLAN
HashAggregate (cost=48.49..48.69 rows=20 width=4)
Group Key: u.department_id
-> Hash Left Join (cost=10.45..43.88 rows=1841 width=4)
Hash Cond: (psrr.user_id = u.id)
-> Seq Scan on tbl_punch_strategy_resource_rels psrr (cost=0.00..28.50 rows=1841 width=4)
Filter: (user_id IS NOT NULL)
-> Hash (cost=10.20..10.20 rows=20 width=8)
-> Seq Scan on tbl_users u (cost=0.00..10.20 rows=20 width=8)