QUERY PLAN
Sort (cost=955.77..955.78 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=955.73..955.76 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..932.85 rows=9152 width=4)
Filter: (code IS NOT NULL)