alirstop-pool-04
    Updated 2022-09-07
    with base as(select iff(len(POOL_NAME)>10,(SUBSTRING(POOL_NAME, 0, charindex('-', POOL_NAME, 0)-1)),POOL_NAME)as Pool_Name,
    sum(UNIQUE_SWAPPER_COUNT) as Number_of_Swapper,
    row_number() over (order by Number_of_Swapper desc) as rank
    from flipside_prod_db.thorchain.daily_pool_stats
    where SWAP_VOLUME_RUNE_USD>0 and SWAP_VOLUME_RUNE>0
    group by 1
    order by 2 desc
    )
    SELECT * from base
    where rank<=10

    Run a query to Download Data