hessDaily Osmosis
    Updated 2023-02-18
    with terra as ( select 'Swap' as type, date(block_timestamp) as date,count(DISTINCT(trader)) as total_user, count(DISTINCT(tx_id)) as total_tx
    from terra.core.ez_swaps
    where date >= '2023-01-01'
    group by 1,2
    UNION
    select 'Staking' as type, date(block_timestamp) as date,count(DISTINCT(delegator_address)) as total_user, count(DISTINCT(tx_id)) as total_tx
    from terra.core.ez_staking
    where date >= '2023-01-01'
    and action = 'Delegate'
    group by 1,2
    UNION
    select 'Unstaking' as type, date(block_timestamp) as date,count(DISTINCT(delegator_address)) as total_user, count(DISTINCT(tx_id)) as total_tx
    from terra.core.ez_staking
    where date >= '2023-01-01'
    and action = 'Undelegate'
    group by 1,2
    UNION
    select 'Add Liquidity' as type, date(block_timestamp) as date,count(DISTINCT(LIQUIDITY_PROVIDER_ADDRESS)) as total_user, count(DISTINCT(tx_id)) as total_tx
    from terra.core.fact_lp_actions
    where date >= '2023-01-01'
    and action in ( 'provide_liquidity','mint_lp_token')
    group by 1,2
    UNION
    select 'Remove Liquidity' as type, date(block_timestamp) as date,count(DISTINCT(LIQUIDITY_PROVIDER_ADDRESS)) as total_user, count(DISTINCT(tx_id)) as total_tx
    from terra.core.fact_lp_actions
    where date >= '2023-01-01'
    and action in ( 'burn_lp_token','withdraw_liquidity')
    group by 1,2
    UNION
    select 'Vote' as type, date(block_timestamp) as date,count(DISTINCT(VOTER)) as total_user, count(DISTINCT(tx_id)) as total_tx
    from terra.core.fact_governance_votes
    where date >= '2023-01-01'
    group by 1,2)
    ,
    osmosis as ( select 'Swap' as type, date(block_timestamp) as date,count(DISTINCT(trader)) as total_user, count(DISTINCT(tx_id)) as total_tx
    from osmosis.core.fact_swaps
    Run a query to Download Data