QUERY PLAN
Sort (cost=845.50..845.51 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=845.46..845.49 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..825.83 rows=7852 width=4)
Filter: (code IS NOT NULL)