QUERY PLAN
HashAggregate (cost=1.30..1.49 rows=19 width=4)
Group Key: department_id
-> Seq Scan on tbl_punch_strategy_resource_rels (cost=0.00..1.25 rows=19 width=4)
Filter: ((department_id IS NOT NULL) AND (punch_strategy_id <> 2))