binhachon24. [Easy] Swap Size Distribution - All
    Updated 2021-12-05
    select
    swap_size,
    sum(frequency) over (
    order by
    swap_size
    ) * 100 / sum(frequency) over () as frequency,
    sum(swap_size) over (
    order by
    swap_size
    ) * 100 / sum(swap_size) over () as volume
    from
    (
    select
    round(from_amount_usd,-1) as swap_size,
    count(swap_size) as frequency
    from
    thorchain.swaps
    where
    block_timestamp > getdate() - interval '90 days'
    group by
    swap_size
    )

    Run a query to Download Data