Unknown column 'SELECTED_ID' in 'where clause'