Abolfazl_771025Squid user categorize by volume of bridge
    Updated 2023-03-07
    with main as (
    select
    DISTINCT a.tx_hash,
    a.block_timestamp,
    a.origin_from_address as sender,
    avg(a.RAW_AMOUNT/power(10, 6)) as volume
    from arbitrum.core.fact_token_transfers a join arbitrum.core.fact_event_logs b on a.tx_hash=b.tx_hash
    where a.to_address LIKE lower('0xce16f69375520ab01377ce7b88f5ba8c48f8d666')
    and a.contract_address LIKE lower('0xEB466342C4d449BC9f53A865D5Cb90586f405215')
    and topics[0] = '0x999d431b58761213cf53af96262b67a069cbd963499fd8effd1e21556217b841'
    group by 1,2,3
    union
    select
    DISTINCT a.tx_hash,
    a.block_timestamp,
    a.origin_from_address as sender,
    avg(a.RAW_AMOUNT/power(10, 6)) as volume
    from polygon.core.fact_token_transfers a join polygon.core.fact_event_logs b on a.tx_hash=b.tx_hash
    where a.to_address LIKE lower('0xce16f69375520ab01377ce7b88f5ba8c48f8d666')
    and a.contract_address LIKE lower('0x750e4C4984a9e0f12978eA6742Bc1c5D248f40ed')
    and topics[0] = '0x999d431b58761213cf53af96262b67a069cbd963499fd8effd1e21556217b841'
    group by 1,2,3
    union
    select
    DISTINCT a.tx_hash,
    a.block_timestamp,
    a.origin_from_address as sender,
    avg(a.RAW_AMOUNT/power(10, 6)) as volume
    from bsc.core.fact_token_transfers a join bsc.core.fact_event_logs b on a.tx_hash=b.tx_hash
    where a.to_address LIKE lower('0xce16f69375520ab01377ce7b88f5ba8c48f8d666')
    and a.contract_address LIKE lower('0x4268B8F0B87b6Eae5d897996E6b845ddbD99Adf3')
    and topics[0] = '0x999d431b58761213cf53af96262b67a069cbd963499fd8effd1e21556217b841'
    group by 1,2,3
    union
    select
    DISTINCT a.tx_hash,
    Run a query to Download Data