QUERY PLAN
Sort (cost=3655.85..3655.85 rows=2 width=36)
Sort Key: code
-> HashAggregate (cost=3655.77..3655.84 rows=2 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..3569.85 rows=34369 width=4)
Filter: (code IS NOT NULL)