Moete2022t15 --
    Updated 2023-01-20


    select
    iff(BLOCK_TIMESTAMP::date ilike '2022%', '2022', '2023') as type,
    iff (action in ('Delegate','Redelegate'),'stake','unstake') as actions,
    sum(AMOUNT) AS Volume,
    avg(AMOUNT) AS avg_Volume,
    count(distinct DELEGATOR_ADDRESS) as DELEGATORs,
    count(distinct tx_id) as txns,
    Volume/DELEGATORs as volume_per_user,
    txns/DELEGATORs as txs_per_user
    from terra.core.ez_staking
    where
    BLOCK_TIMESTAMP >= '2022-01-01'
    group by 1,2

    Run a query to Download Data