QUERY PLAN
Sort (cost=4179.21..4179.21 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=4179.16..4179.20 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..4093.48 rows=34274 width=4)
Filter: (code IS NOT NULL)