 ((res_view_letterbox.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_view_letterbox.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 <> 'END') OR res_view_letterbox.res_id in (select res_id from basket_persistent_mode WHERE user_id = @user and is_persistent = 'Y'))and status <> 'DEL' 