Unknown column 'distance' in 'order clause':select * from sykes_jobs where isstaging = 0 and workplace = 'WAH' and country = 'ca' and country = 'ca' and location = 'montreal,quebec' order by -distance, rand_col desc limit 0, 50