QUERY PLAN
Sort (cost=3262.81..3262.81 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=3262.77..3262.80 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..3195.55 rows=26886 width=4)
Filter: (code IS NOT NULL)