QUERY PLAN
Sort (cost=137.68..137.69 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=137.64..137.67 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..135.11 rows=1011 width=4)
Filter: (code IS NOT NULL)