cypherSolana - 5. Gaming on Sol - common users
Updated 2023-02-07
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with aurory_users as (select
array_agg(distinct signers[0]) as all_aurory_users
-- signers[0] as user,
-- min(block_timestamp) as first_tx
from solana.core.fact_events
where succeeded
and program_id = 'STkwf3sbMapjy7KV3hgrJtcVvY4SvRxWQ8pj4Enw1i5'
-- group by user
),
star_atlas_users as (select
array_agg(distinct signers[0]) as all_star_atlas_users
-- signers[0] as user,
-- min(block_timestamp) as first_tx
from solana.core.fact_events
where succeeded
and program_id = 'ATLocKpzDbTokxgvnLew3d7drZkEzLzDpzwgrgWKDbmc'
-- group by user
),
genopets_users as (select
array_agg(distinct signers[0]) as all_genopets_users
-- signers[0] as user,
-- min(block_timestamp) as first_tx
from solana.core.fact_events
where succeeded
and program_id = 'StaKe9nb7aUjXpjpZ45o6uJBsZxj2BWCDBtjk8LCg2v'
-- group by user
),
final as (select * from aurory_users
join star_atlas_users
join genopets_users),
matching_users as (select
array_intersection(all_aurory_users, all_star_atlas_users) as matching_aurory_atlas,
array_intersection(all_aurory_users, all_genopets_users) as matching_aurory_genopets,
array_intersection(all_star_atlas_users, all_genopets_users) as matching_atlas_genopets,
Run a query to Download Data