par_rnDaily Number of ETH Staked and Unstaked Transactions On Ankr
    Updated 2022-11-04
    with lido_staking_data as (
    select block_timestamp::date as date,
    sum(AMOUNT) as staked_amount,
    count(tx_hash) as stake_txs
    from ethereum.core.ez_eth_transfers
    where ETH_TO_ADDRESS = '0x84db6ee82b7cf3b47e8f19270abde5718b936670'
    group by 1
    ),

    lido_unstaking_data as (
    select block_timestamp::date as date,
    sum(amount_in) as unstaked_amount,
    count(tx_hash) as unstake_txs
    from ethereum.core.ez_dex_swaps
    where symbol_out = 'stETH'
    group by 1
    ),

    eth_price_data as (
    select block_timestamp::date as date,
    avg(token_price) as ETH_price
    from ethereum.core.ez_token_transfers
    where symbol = 'WETH'
    --and date >= '2020-12-18'
    group by 1
    )

    select a.date,
    a.stake_txs as "Number of Staked Transactions",
    b.unstake_txs as "Number of Unstaked Transactions",
    a.staked_amount as "Staked Volume",
    b.unstaked_amount as "Unstaked Volume",
    ETH_price
    from lido_staking_data a
    left join lido_unstaking_data b using(date)
    left join eth_price_data using(date)
    Run a query to Download Data