QUERY PLAN
Sort (cost=7.36..7.48 rows=47 width=8)
Sort Key: head_of
-> HashAggregate (cost=5.59..6.06 rows=47 width=8)
Group Key: id
-> Seq Scan on tbl_operation_tasks s (cost=0.00..5.47 rows=47 width=8)