(res_id in (select res_id from listinstance WHERE coll_id = 'letterbox_coll' and item_type = 'user_id' and item_id = @user and item_mode = 'cc') or res_id in (select res_id from listinstance WHERE coll_id = 'letterbox_coll' and item_type = 'entity_id' and item_mode = 'cc' and item_id in (@my_entities))) and status not in ( 'DEL', 'END', 'SSUITE') and res_id not in (select res_id from res_mark_as_read WHERE user_id = @user)