MLDZMNUSA7
    Updated 2023-01-03
    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