Sbhn_NPcontroversial-gray
    Updated 2024-11-14
    with price as (
    select token_address,
    hour::date as datee,
    avg(price) as usdprice
    from ethereum.price.ez_prices_hourly
    group by 1,2
    )

    select
    sum(decoded_log:depositAmount/pow(10,18)) as eth,
    sum((decoded_log:depositAmount/pow(10,18))*usdprice) as usd,
    count(DISTINCT origin_from_address) as sender
    from ethereum.core.ez_decoded_event_logs
    join price on block_timestamp::date=datee and decoded_log:depositAsset=token_address
    where contract_address = '0x6ae187eacf40ebd1e571a655db92a1f47452e0bf' --contract
    and origin_to_address = '0xfbe0c54d696fa6c93f35d4ca7d656561816c15f6'
    and event_name = 'Deposit'

    Last run: 25 days ago
    ETH
    USD
    SENDER
    1
    7970.12765497424600357.592677122320
    1
    41B
    14s