Unknown column 'spectrum' in 'where clause'