View difference between Paste ID: s2iUxdxa and G5MyeJpj
SHOW: | | - or go back to the newest paste.
1
select 
2
    source_persona_id,
3
    relation_type,
4
    message_id,
5
    reply_to_message_id,
6
    reshare_of_message_id,
7
    target_object_id,
8
    target_persona_id,
9
    created_at,
10
    updated_at,
11
    sent_at
12
from
13
    s_relations
14
where
15-
    target_persona_id in (select 
15+
    source_persona_id in (select 
16
            persona_id
17
        from
18-
            active_personas) into outfile '/tmp/engaged_relations.csv' FIELDS TERMINATED BY ',';
18+
            users
19
                join
20
            active_users ON users.id = active_users.user_id) into outfile '/tmp/engaged_relations.csv' FIELDS TERMINATED BY ',';