QUERY PLAN
Sort (cost=4015.83..4015.84 rows=2 width=36)
Sort Key: code
-> HashAggregate (cost=4015.76..4015.82 rows=2 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..3920.65 rows=38042 width=4)
Filter: (code IS NOT NULL)