Unknown column 'distance' in 'order clause':select * from sykes_jobs where isstaging = 0 and ( city like '%Silver Spring, Maryland%' or address like '%Silver Spring, Maryland%' or state like '%Silver Spring, Maryland%' or title like '%Silver Spring, Maryland%' or location like '%Silver Spring, Maryland%' ) order by case when workplace = 'W@H' then 1 else 0 end, distance, rand_col desc limit 0, 50