malekibehzad-b-6XqJ2023-08-27 02:02 AM
    Updated 2023-08-26
    with main as (
    select
    tx_hash,
    block_timestamp,
    origin_from_address as user,
    token_amount_usd,
    token_amount,
    eth_amount,
    eth_amount_usd,
    'Deposit' as type
    from ethereum.defi.ez_liquid_staking_deposits
    where platform = 'rocketpool'

    union all

    select
    tx_hash,
    block_timestamp,
    origin_from_address as user,
    token_amount_usd,
    token_amount,
    eth_amount,
    eth_amount_usd,
    'Withdraw' as type
    from ethereum.defi.ez_liquid_staking_withdrawals
    where platform = 'rocketpool'
    ),

    users as (
    select
    date_trunc('month', created_at)::date as month,
    count(distinct user) as new_user
    from (
    select
    user,
    min(block_timestamp) as created_at,
    Run a query to Download Data