yasmin-n-d-r-hUntitled Query
    Updated 2022-08-22
    with x as (
    with tokens as (
    select
    distinct token_ADDRESS,
    SYMBOL,
    DECIMALS
    from
    optimism.core.fact_hourly_token_prices
    where
    token_ADDRESS in (
    '0x7f5c764cbc14f9669b88837ca1490cca17c31607',
    '0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9',
    '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1',
    '0x94b008aa00579c1307b0ef2c499ad98a8ce58e58'
    )
    and HOUR :: DATE >= CURRENT_DATE - 14
    )
    select
    date_trunc('day', block_timestamp) as date,
    tokens.SYMBOL as tokens,
    sum(
    RAW_AMOUNT / pow(10, tokens.DECIMALS)
    ) as volume
    from
    optimism.core.fact_token_transfers
    join tokens on optimism.core.fact_token_transfers.CONTRACT_ADDRESS = tokens.token_ADDRESS
    where
    ORIGIN_FROM_ADDRESS = FROM_ADDRESS
    and ORIGIN_TO_ADDRESS = '0x170a5714112daeff20e798b6e92e25b86ea603c1'
    and from_address != '0x0000000000000000000000000000000000000000'
    and from_address != '0x061b87122ed14b9526a813209c8a59a633257bab'
    and origin_function_signature in ('0x6cc5a6ff', '0x8875eb84')
    and block_timestamp :: date >= CURRENT_DATE - 14
    group by
    date,
    tokens.symbol
    Run a query to Download Data