QUERY PLAN
Sort (cost=377.89..377.89 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=377.84..377.88 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..369.28 rows=3426 width=4)
Filter: (code IS NOT NULL)