QUERY PLAN
Sort (cost=4484.45..4484.46 rows=2 width=36)
Sort Key: code
-> HashAggregate (cost=4484.38..4484.44 rows=2 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..4378.17 rows=42483 width=4)
Filter: (code IS NOT NULL)