select source_persona_id, relation_type, message_id, reply_to_message_id, reshare_of_message_id, target_object_id, target_persona_id, created_at, updated_at, sent_at from s_relations where (target_object_id is NULL or target_object_id not in (XXX)) and id