mariyaPercentage of whales participating in the exchange
    Updated 2022-04-19
    with whales as (
    SELECT address
    from algorand.account
    where balance >= 100000
    ),
    whales_swapped_count AS (
    SELECT
    COUNT(DISTINCT swapper) as swapper_count
    from algorand.swaps
    where date(block_timestamp) >= '2022-01-01'
    and swap_from_amount > 0
    and swapper in (SELECT address from whales)
    ),
    all_count as (
    SELECT
    COUNT(DISTINCT address) as all_count
    FROM whales
    )

    SELECT sw.swapper_count, al.all_count,
    (sw.swapper_count / al.all_count) * 100 as whales_in_swaps
    FROM whales_swapped_count sw
    join all_count al
    Run a query to Download Data