QUERY PLAN
Sort (cost=5183.63..5183.63 rows=2 width=36)
Sort Key: code
-> HashAggregate (cost=5183.55..5183.62 rows=2 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..5061.93 rows=48649 width=4)
Filter: (code IS NOT NULL)