Invalid query: Unknown column 'region' in 'order clause' Whole query: select * from VOIP.region_rates order by LOWER(trim(region))