QUERY PLAN
Sort (cost=4980.82..4980.83 rows=2 width=36)
Sort Key: code
-> HashAggregate (cost=4980.74..4980.81 rows=2 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..4863.88 rows=46746 width=4)
Filter: (code IS NOT NULL)