QUERY PLAN
Sort (cost=1283.05..1283.05 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=1283.00..1283.04 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..1251.87 rows=12454 width=4)
Filter: (code IS NOT NULL)