QUERY PLAN
Sort (cost=4590.67..4590.67 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=4590.62..4590.66 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..4497.04 rows=37433 width=4)
Filter: (code IS NOT NULL)