sarathUser segmentation_analy1.5
    Updated 2023-01-02
    with tab1 as (
    select
    RECEIVER as Tab1_sender,
    min(block_timestamp) as First_Transfer_Date

    from osmosis.core.fact_transfers
    where transfer_type like 'IBC_TRANSFER_IN'
    and RECEIVER is not null
    group by 1
    )

    , tab2 as (
    select
    RECEIVER,
    block_timestamp,
    currency


    from osmosis.core.fact_transfers
    where transfer_type like 'IBC_TRANSFER_IN'
    and RECEIVER is not null
    )


    select top 5
    currency,
    count(*)

    from tab1 left outer join tab2 on Tab1_sender = RECEIVER
    and First_Transfer_Date = block_timestamp
    where RECEIVER like '%osmo%'
    and currency not like 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2'
    and currency not like 'transfer/channel-141/uosmo'
    group by 1
    order by 2 DESC


    Run a query to Download Data