QUERY PLAN
Sort (cost=3542.00..3542.00 rows=2 width=36)
Sort Key: code
-> HashAggregate (cost=3541.92..3541.99 rows=2 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..3459.37 rows=33020 width=4)
Filter: (code IS NOT NULL)