(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 <> 'DEL'