gokcintop 5
    Updated 2022-10-20
    with daus as (
    SELECT
    distinct tx_from as users,trunc(block_timestamp,'week') as date,
    count(distinct trunc(block_timestamp,'day')) as active_days
    from osmosis.core.fact_transactions where tx_status = 'SUCCEEDED'
    group by 1,2
    having active_days>=4
    ),
    active_users as (
    SELECT
    trunc(block_timestamp,'week') as date,
    tx_from as users,
    tx_id as txs
    from osmosis.core.fact_transactions where tx_from in (select users from daus)
    group by 1,2,3
    ),
    transfers as (
    select distinct receiver,
    count(distinct receiver) as unique_wallet,
    count(distinct tx_id) as txs
    from osmosis.core.fact_transfers where receiver in (select users from active_users)
    group by 1,receiver


    )
    select receiver,TXS from transfers
    order by txs desc
    limit 5
    Run a query to Download Data