hessChristmas and New Year users Activity
    Updated 2023-01-11
    with user as ( select min(block_timestamp) as date, tx_sender
    from terra.core.fact_transactions
    group by 2)
    ,
    new_user as ( select DISTINCT tx_sender
    from user
    where date >= '2022-12-25')
    ,
    final as ( select 'Stake' as type, delegator_address as user, count(DISTINCT(tx_id)) as total_tx
    from terra.core.ez_staking
    where action = 'Delegate'
    and block_timestamp >= CURRENT_DATE - 60
    and delegator_address in ( select tx_sender from new_user)
    group by 1,2
    UNION
    select 'Unstake' as type, delegator_address as user, count(DISTINCT(tx_id)) as total_tx
    from terra.core.ez_staking
    where action = 'Undelegate'
    and block_timestamp >= CURRENT_DATE - 60
    and delegator_address in ( select tx_sender from new_user)
    group by 1,2
    UNION
    select 'Redelegate' as type, delegator_address as user, count(DISTINCT(tx_id)) as total_tx
    from terra.core.ez_staking
    where action = 'Redelegate'
    and block_timestamp >= CURRENT_DATE - 60
    and delegator_address in ( select tx_sender from new_user)
    group by 1,2
    UNION
    select 'Swap' as type, trader as user, count(DISTINCT(tx_id)) as total_tx
    from terra.core.ez_swaps
    where block_timestamp >= CURRENT_DATE - 60
    and trader in ( select tx_sender from new_user)
    group by 1,2
    UNION
    select 'Transfer' as type, sender as user, count(DISTINCT(tx_id)) as total_tx
    Run a query to Download Data