QUERY PLAN
Sort (cost=5881.85..5881.85 rows=2 width=36)
Sort Key: code
-> HashAggregate (cost=5881.77..5881.84 rows=2 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..5761.14 rows=48253 width=4)
Filter: (code IS NOT NULL)