SocioCryptoBridges to Neutron using Satellite
    Updated 2023-11-07
    -- forked from Bridges to Neutron using Squid @ https://flipsidecrypto.xyz/edit/queries/4db57926-e181-4472-bbc9-1004e7b3a414
    with prices as
    (
    SELECT CASE when symbol='BNB' then 'WBNB'
    else symbol end as token_symbol, *
    FROM osmosis.core.ez_prices
    )

    SELECT 'satellite' as platform,
    source_chain,
    --date_trunc('day',block_timestamp) as date,
    count(DISTINCT sender) as n_senders,
    count(DISTINCT tx_hash) as n_bridges,
    sum(CASE when a.token_symbol in ('USDC','axlUSDC', 'FRAX') then amount else amount*price end) as vol,
    avg(CASE when a.token_symbol in ('USDC','axlUSDC', 'FRAX') then amount else amount*price end) as avg_size
    FROM axelar.core.ez_satellite a
    LEFT JOIN prices b
    on a.token_symbol = b.token_symbol AND date_trunc('hour',a.block_timestamp) = b.recorded_hour
    WHERE destination_chain = 'neutron'
    GROUP by 1,2

    Run a query to Download Data