niloUntitled Query
    Updated 2022-11-18
    with users as (
    select distinct swapper
    from algorand.defi.fact_swap
    where swap_program = ('{{exchange}}')
    ),
    assets1 as (
    SELECT
    distinct
    ASSET_NAME as assets,
    count(distinct address) as holders
    from algorand.core.fact_account_asset a left join algorand.core.dim_asset b on a.ASSET_ID = b.ASSET_ID
    where address in (select * from users)
    and ASSET_NAME != 'ALGO'
    group by 1)
    select
    assets, holders
    from assets1
    order by 2 desc
    limit 10

    Run a query to Download Data