QUERY PLAN
Sort (cost=1287.61..1287.61 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=1287.56..1287.60 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..1256.31 rows=12501 width=4)
Filter: (code IS NOT NULL)