hesstest II copy
    Updated 2023-08-19
    SELECT
    *,
    sum(transfers) over (partition by chain order by week) as total_ibc_transfers

    FROM (
    SELECT
    week,
    chain,
    count(DISTINCT tx_id) as transfers


    FROM (

    SELECT
    date_trunc('week', block_timestamp) as week,
    tx_id,
    'SEI' as chain
    FROM osmosis.core.fact_transfers
    WHERE receiver LIKE 'sei%'

    UNION

    SELECT
    date_trunc('week', block_timestamp) as week,
    tx_id,
    'Cosmos' as chain
    FROM cosmos.core.fact_transfers
    WHERE transfer_type LIKE '%IBC%'

    UNION

    SELECT
    date_trunc('week', block_timestamp) as week,
    tx_id,
    'Terra2' as chain
    FROM terra.core.ez_transfers
    Run a query to Download Data