mattkstewOpensea Fees 7
    Updated 2022-08-01
    with tabETH_Price as (
    select
    date_trunc('day', hour) as date0,
    price as ETH_Price
    from ethereum.core.fact_hourly_token_prices
    where symbol like 'WETH'
    )


    , tab2 as (
    select
    date_trunc('day', block_timestamp) as date2,
    sum(raw_amount) / 1e18 as ETH_Volume

    from polygon.core.fact_token_transfers left outer join polygon.core.dim_labels
    on contract_address = address
    --left outer join -- tabETH_Price on date_trunc('day', block_timestamp) = date0
    where address_name like 'hop protocol: eth l2canonicalbridge'
    and to_address like lower('0xF715bEb51EC8F63317d66f491E37e7BB048fCc2d')
    group by 1 )


    select
    date2,
    eth_volume * eth_price
    from tabETH_Price left outer join tab2 on date0 = date2

    Run a query to Download Data