sarathmisouser6
    Updated 2022-09-20
    with tokens as (
    select

    distinct CONTRACT_ADDRESS as tokens,
    BLOCK_TIMESTAMP as time_created
    from polygon.core.fact_token_transfers
    where ORIGIN_TO_ADDRESS ='0xc040f84cf7046409f92d578ef9040fe45e6ef4be'
    ),

    commit_contracts as (
    select
    distinct CONTRACT_ADDRESS as tokens,
    TO_ADDRESS as commit_address
    from polygon.core.fact_token_transfers
    where FROM_ADDRESS='0x3e603c14af37ebdad31709c4f848fc6ad5bec715'
    ),

    T1 as (
    select
    TX_HASH,
    BLOCK_TIMESTAMP,
    ORIGIN_FROM_ADDRESS,
    TO_ADDRESS as TO_ADDRESS,
    raw_amount as amount
    from polygon.core.fact_token_transfers
    where TO_ADDRESS in (select commit_address from commit_contracts)
    and ORIGIN_FUNCTION_SIGNATURE ='0xdc97e082'

    union ALL


    select
    TX_HASH,
    BLOCK_TIMESTAMP,
    ORIGIN_FROM_ADDRESS,
    Run a query to Download Data