QUERY PLAN
Sort (cost=4340.38..4340.39 rows=2 width=36)
Sort Key: code
-> HashAggregate (cost=4340.31..4340.37 rows=2 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..4237.51 rows=41118 width=4)
Filter: (code IS NOT NULL)