QUERY PLAN
Sort (cost=816.08..816.09 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=816.04..816.07 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..797.09 rows=7579 width=4)
Filter: (code IS NOT NULL)