QUERY PLAN
Sort (cost=3540.87..3540.88 rows=2 width=36)
Sort Key: code
-> HashAggregate (cost=3540.80..3540.86 rows=2 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..3458.27 rows=33010 width=4)
Filter: (code IS NOT NULL)