QUERY PLAN
Sort (cost=1131.00..1131.01 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=1130.96..1130.99 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..1103.63 rows=10931 width=4)
Filter: (code IS NOT NULL)