adriaparcerisasterra old bounty all2
    Updated 2022-11-22
    WITH
    t1 as (
    select date_trunc('day',block_timestamp) as date,
    sum(asset_amount/pow(10,decimals)) as total_amount,
    count(distinct tx_id) as transactions,
    count(distinct tx_sender) as wallets,
    total_amount/transactions as average_amount_per_transfer,
    total_amount/wallets as average_amount_per_wallet
    from algorand.core.ez_transaction_asset_transfer
    where block_timestamp::date >= current_date -30
    and asset_id = 31566704 group by 1
    ),
    t2 as (
    select date_trunc('day',block_timestamp) as date,
    sum(amount/pow(10,decimal)) as total_amount,
    count(distinct tx_id) as transactions,
    count(distinct sender) as wallets,
    total_amount/transactions as average_amount_per_transfer,
    total_amount/wallets as average_amount_per_wallet
    from axelar.core.fact_transfers
    where currency = 'uusdc' and TX_SUCCEEDED = 'TRUE'
    and block_timestamp::date >= current_date -30 group by 1
    ),
    t3 as (
    select date_trunc('day',block_timestamp) as date,
    sum(amount) as total_amount,
    count(distinct tx_id) as transactions,
    count(distinct FLOW_WALLET_ADDRESS) as wallets,
    total_amount/transactions as average_amount_per_transfer,
    total_amount/wallets as average_amount_per_wallet
    from flow.core.ez_bridge_transactions
    where token_contract = 'A.b19436aae4d94622.FiatToken'
    and block_timestamp::date >= current_date -30 group by 1
    ),
    t4 as (
    select date_trunc('day',block_timestamp) as date,
    Run a query to Download Data