gokcinsolmin
Updated 2022-08-10Copy Reference Fork
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 bridge as (select wallet,
a.tx_id ,
date
from solana.fact_transactions a join bridge b on a.signers[0] = b.wallet
where date < block_timestamp
group by 1,2,3
) ,
second_transaction as (
select wallet, tx_id, min(date) from first_transaction
group by 1,2
),
event_function as (
select
b.inner_instruction:instructions[0]:parsed:type as event_type,
a.tx_id,
INSTRUCTION:accounts as wallet
from flipside_prod_db.solana.fact_transactions a
inner join solana.core.fact_events b
on a.tx_id = b.tx_id
join second_tranasaction c on b.tx_id =c.tx_id
where b.program_id = 'wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb'
and b.succeeded = 'TRUE'
and b.block_timestamp >= '2022-01-01'
)
select
event_type,
count(wallet) as total_users,
count(tx_id) as tx_count
Run a query to Download Data