QUERY PLAN
Sort (cost=953.51..953.51 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=953.47..953.50 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..930.64 rows=9131 width=4)
Filter: (code IS NOT NULL)