QUERY PLAN
Sort (cost=4144.66..4144.66 rows=1 width=36)
Sort Key: code
-> HashAggregate (cost=4144.61..4144.65 rows=1 width=36)
Group Key: code
-> Seq Scan on tbl_api_log a (cost=0.00..4059.64 rows=33990 width=4)
Filter: (code IS NOT NULL)