QUERY PLAN
Sort (cost=3539.73..3539.74 rows=2 width=36)
Sort Key: code
-> HashAggregate (cost=3539.66..3539.72 rows=2 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..3457.16 rows=32999 width=4)
Filter: (code IS NOT NULL)