Madiactions
    Updated 2022-12-31
    with mindatetransactions as
    (select
    tx_from as wallet,
    min(block_timestamp) as mindate
    from osmosis.core.fact_transactions
    group by 1
    ),
    actions as (
    SELECT
    TRADER as wallet,
    'Swap' as action_c,
    min(BLOCK_TIMESTAMP) as date
    FROM osmosis.core.fact_swaps
    where TX_STATUS = 'SUCCEEDED'
    group by 1,2

    UNION

    SELECT
    DELEGATOR_ADDRESS as wallet,
    'Staking' as action_c,
    min(BLOCK_TIMESTAMP) as date
    FROM osmosis.core.fact_staking
    where TX_STATUS = 'SUCCEEDED'
    group by 1,2

    UNION

    SELECT
    LIQUIDITY_PROVIDER_ADDRESS as wallet,
    'LP actions' as action_c,
    min(BLOCK_TIMESTAMP) as date
    FROM osmosis.core.fact_liquidity_provider_actions
    where TX_STATUS = 'SUCCEEDED'
    group by 1,2
    Run a query to Download Data