Afonso_Diaz2023-08-25 10:51 PM
    Updated 2023-08-25
    with

    pricet as (
    select
    hour::date as date,
    token_address,
    avg(price) as usdprice
    from ethereum.core.fact_hourly_token_prices
    group by 1,2
    )
    ,

    deposits as (
    select
    tx_hash,
    block_timestamp,
    amount_deposited*usdprice as amount_usd,
    amount_deposited,
    symbol,
    'Deposit' as type,
    depositor as user
    from ethereum.maker.ez_deposits a
    join pricet on pricet.token_address = token_deposited
    where TX_STATUS = 'SUCCESS'
    )

    select * from deposits
    where tx_hash = '0x455b6550f0d3019f8d0f6f78bc8351e23b6e553acd7b3bceb7e4354ddaf0a7e5'
    Run a query to Download Data