Unknown column 'c.sector' in 'where clause'