1054: Unknown column 'inter' in 'where clause'