hessDaily Activities
    Updated 2023-01-11
    select 'Stake' as type, date(block_timestamp) as date, count(DISTINCT(tx_id)) as total_tx, count(DISTINCT(delegator_address)) as total_user,
    sum(total_tx) over (order by date asc) as cum_tx
    from terra.core.ez_staking
    where action = 'Delegate'
    and date >= CURRENT_DATE - 60
    group by 1,2
    UNION
    select 'Unstake' as type, date(block_timestamp) as date, count(DISTINCT(tx_id)) as total_tx, count(DISTINCT(delegator_address)) as total_user,
    sum(total_tx) over (order by date asc) as cum_tx
    from terra.core.ez_staking
    where action = 'Undelegate'
    and date >= CURRENT_DATE - 60
    group by 1,2
    UNION
    select 'Redelegate' as type, date(block_timestamp) as date, count(DISTINCT(tx_id)) as total_tx, count(DISTINCT(delegator_address)) as total_user,
    sum(total_tx) over (order by date asc) as cum_tx
    from terra.core.ez_staking
    where action = 'Redelegate'
    and date >= CURRENT_DATE - 60
    group by 1,2
    UNION
    select 'Swap' as type, date(block_timestamp) as date, count(DISTINCT(tx_id)) as total_tx, count(DISTINCT(trader)) as total_user,
    sum(total_tx) over (order by date asc) as cum_tx
    from terra.core.ez_swaps
    where date >= CURRENT_DATE - 60
    group by 1,2
    UNION
    select 'Transfer' as type, date(block_timestamp) as date, count(DISTINCT(tx_id)) as total_tx, count(DISTINCT(sender)) as total_user,
    sum(total_tx) over (order by date asc) as cum_tx
    from terra.core.ez_transfers
    where date >= CURRENT_DATE - 60
    group by 1,2
    UNION
    select 'NFT Sales' as type, date(block_timestamp) as date, count(DISTINCT(tx_id)) as total_tx, count(DISTINCT(PURCHASER)) as total_user,
    sum(total_tx) over (order by date asc) as cum_tx
    from terra.core.fact_nft_sales
    Run a query to Download Data