vendettaUntitled Query
    Updated 2022-08-28
    with dopex as(
    select FROM_ADDRESS, sum(RAW_AMOUNT / 1e6) as usdc, count(raw_amount) as tx
    from arbitrum.core.fact_token_transfers
    where to_address='0x0be0905dafa89dac8f26e9f96e04cfe3c5fa3e51'
    and contract_address='0xff970a61a04b1ca14834a43f5de4533ebddb5cc8'-- straddles contract
    and ORIGIN_FUNCTION_SIGNATURE ='0x80ed71e4'
    group by 1
    order by usdc desc
    ),
    a as (
    select from_address, ethereum.public.udf_hex_to_int(substring(tx_json:receipt:logs[3]:data , 70, 61) ) * 1 as price
    from arbitrum.core.fact_transactions
    where to_address='0x0be0905dafa89dac8f26e9f96e04cfe3c5fa3e51'
    and tx_json:receipt:logs[3]:topics[0]= '0x14c0e56f4125d5707194bbf1beff49bb39b170a0f49574bcf25d8616f4df1cf6'
    )
    select count(from_address) from dopex
    Run a query to Download Data