hessCopy of t
    Updated 2022-11-22
    with ethereum_user as ( select date(block_timestamp) as date, FROM_ADDRESS, tx_hash , amount_usd as volumes
    from ethereum.core.ez_token_transfers
    where symbol = 'USDC'
    and block_timestamp::date >= CURRENT_DATE - {{N_Days}}
    and contract_address = lower('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48')
    )
    ,
    optimism_user as ( select date(block_timestamp) as date, FROM_ADDRESS, tx_hash, raw_amount/pow(10,6) as volumes
    from optimism.core.fact_token_transfers
    where contract_address = lower('0x7f5c764cbc14f9669b88837ca1490cca17c31607')
    and block_timestamp::date >= CURRENT_DATE - {{N_Days}}
    and raw_amount::float > 0
    )
    ,
    avalanche_user as ( select date(block_timestamp) as date, FROM_ADDRESS, tx_hash, raw_amount/pow(10,6) as volumes
    from avalanche.core.fact_token_transfers
    where contract_address = lower('0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e')
    and block_timestamp::date >= CURRENT_DATE - {{N_Days}}
    )
    ,
    arbitrum_user as ( select date(block_timestamp) as date, FROM_ADDRESS, tx_hash, raw_amount/pow(10,6) as volumes
    from arbitrum.core.fact_token_transfers
    where contract_address = lower('0xff970a61a04b1ca14834a43f5de4533ebddb5cc8')
    and block_timestamp::date >= CURRENT_DATE - {{N_Days}}
    )
    ,
    Polygon_user as ( select date(block_timestamp) as date, FROM_ADDRESS, tx_hash, raw_amount/pow(10,6) as volumes
    from polygon.core.fact_token_transfers
    where contract_address = lower('0x2791bca1f2de4661ed88a30c99a7a9449aa84174')
    and block_timestamp::date >= CURRENT_DATE - {{N_Days}}
    )
    ,
    gnosis_user as ( select date(block_timestamp) as date, FROM_ADDRESS, tx_hash, raw_amount/pow(10,6) as volumes
    from gnosis.core.fact_token_transfers
    where contract_address = lower('0xddafbb505ad214d7b80b1f830fccc89b60fb7a83')
    and block_timestamp::date >= CURRENT_DATE - {{N_Days}}
    Run a query to Download Data