adriaparcerisasaxelar crosschains 2
    Updated 2024-09-25
    with
    satellite as (
    SELECT
    block_timestamp,tx_hash,
    source_chain,sender,destination_chain,
    token_symbol,amount
    from axelar.defi.ez_bridge_satellite
    ),
    squid as (
    SELECT
    block_timestamp,tx_hash,
    source_chain,sender,destination_chain,
    token_symbol,amount
    from axelar.defi.ez_bridge_squid
    ),
    total as (
    select * from satellite union select * from squid
    ),
    prices as (
    select
    trunc(hour,'day') as day,
    symbol,
    avg(price) as price_usd
    from crosschain.price.ez_prices_hourly
    group by 1,2
    ),
    final as (
    SELECT
    trunc(block_timestamp,'{{granularity}}') as date,
    count(distinct tx_hash) as transactions,
    count(distinct sender) as active_users,
    sum(amount*price_usd) as volume_usd
    from total x
    join prices y on trunc(x.block_timestamp,'day')=y.day
    and token_symbol=symbol
    where amount*price_usd<1e6
    Last run: about 2 months ago
    DATE
    TRANSACTIONS
    ACTIVE_USERS
    VOLUME_USD
    1
    2024-11-01 00:00:00.0007727449644065140.3247949
    2
    2022-04-01 00:00:00.0002998153735432342.3470778
    3
    2023-12-01 00:00:00.000158277714106378739.114089
    4
    2025-01-01 00:00:00.0009467546941970024.4592621
    5
    2024-04-01 00:00:00.00010074486152648037.6876577
    6
    2023-04-01 00:00:00.0004111109734192482.8252761
    7
    2022-07-01 00:00:00.000147258226544284.3504008
    8
    2024-08-01 00:00:00.0006328321124521349.4777323
    9
    2023-11-01 00:00:00.00010769481468627682.2758908
    10
    2022-06-01 00:00:00.000195162339785287.9610394
    11
    2024-12-01 00:00:00.0009867609049539904.3948898
    12
    2022-12-01 00:00:00.0005429257758250710.0948609
    13
    2023-03-01 00:00:00.0005184162641867026.8525357
    14
    2024-06-01 00:00:00.0006273298936935009.6548485
    15
    2025-02-01 00:00:00.00012105779733889469.9282321
    16
    2024-10-01 00:00:00.0006453302830796339.1214544
    17
    2024-07-01 00:00:00.0006009320934353369.3787944
    18
    2024-02-01 00:00:00.00010192510764052788.1912744
    19
    2023-08-01 00:00:00.0006863263356591063.199363
    20
    2023-07-01 00:00:00.0005290158944049714.5766109
    39
    2KB
    13s