Sbhn_NPjudicial-apricot
    Updated 2025-02-06
    with price as (
    select hour::date as datee,
    symbol,
    avg(price) as usdprice
    from crosschain.price.ez_prices_hourly
    group by 1,2
    )

    select date_trunc('day',block_timestamp) as date,
    case when contract_name = 'EVK Vault eswETH-1' then 'SWETH'
    when contract_name = 'EVK Vault epzETH-1' then 'PZETH'
    when contract_name = 'EVK Vault eweETH-1' then 'WEETH'
    when contract_name = 'EVK Vault eezETH-1' then 'EZETH'
    when contract_name = 'EVK Vault eWETH-1' then 'WETH'
    when contract_name = 'EVK Vault ersETH-1' then 'RSETH'
    when contract_name = 'EVK Vault erswETH-1' then 'RSWETH'
    when contract_name = 'EVK Vault ewstETH-1' then 'WSTETH'
    end as token,
    count(DISTINCT origin_from_address) as users,
    sum(decoded_log:assets/pow(10,18)) as amount,
    sum((decoded_log:assets/pow(10,18))*usdprice) as usd,
    sum(usd) over (order by date) as cumulative_usd
    from swell.core.ez_decoded_event_logs
    join price on token=symbol and block_timestamp::date=datee
    where event_name ='Deposit'
    and origin_to_address = '0x08739cbede6e28e387685ba20e6409bd16969cde'
    and block_timestamp::date >= '2025-01-28'
    group by 1,2



    QueryRunArchived: QueryRun has been archived