MLDZMNUSA7
Updated 2023-01-03Copy 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 tb4 as (select
distinct RECEIVER as users,
tx_id,
block_timestamp
from osmosis.core.fact_transfers
where transfer_type = 'IBC_TRANSFER_IN'
and receiver ilike 'osmo%'
),
tb5 as (select
s.block_timestamp,
s.tx_id,
voter as wallet,
'Vote' as first_action,
ROW_NUMBER() OVER (partition by voter order by s.BLOCK_TIMESTAMP) as t_n
from osmosis.core.fact_governance_votes s
left join tb4 a on s.VOTER = a.users and s.block_timestamp > a.block_timestamp and s.tx_id=a.tx_id
where s.tx_status = 'SUCCEEDED'),
tb6 as (select
s.block_timestamp,
s.tx_id,
LIQUIDITY_PROVIDER_ADDRESS as wallet,
'Liquidity provide' as first_action,
ROW_NUMBER() OVER (partition by LIQUIDITY_PROVIDER_ADDRESS order by s.BLOCK_TIMESTAMP) as t_n
from osmosis.core.fact_liquidity_provider_actions s
left join tb4 a on s.LIQUIDITY_PROVIDER_ADDRESS = a.users and s.block_timestamp > a.block_timestamp and s.tx_id=a.tx_id
where s.tx_status = 'SUCCEEDED'),
tb7 as (select
s.block_timestamp,
s.tx_id,
DELEGATOR_ADDRESS as wallet,
'Stake' as first_action,
ROW_NUMBER() OVER (partition by DELEGATOR_ADDRESS order by s.BLOCK_TIMESTAMP) as t_n
from osmosis.core.fact_staking s
Run a query to Download Data