nitsRUNE Distribution
    Updated 2022-09-07
    SELECT distribution, count(DISTINCT tx_id) as total_incidents,
    sum(rune_amt) as total_amt_swapped, count(DISTINCT from_address) as swapper
    from
    (SELECT *, from_amount_usd/rune_usd as rune_amt,
    case when rune_amt < 1 then 'a- less than 1 $RUNE'
    when rune_amt>= pow(10,0) and rune_amt< pow(10,1) then 'b- 1-10 $RUNE'
    when rune_amt>= pow(10,1) and rune_amt< pow(10,2) then 'c- 10-100 $RUNE'
    when rune_amt>= pow(10,2) and rune_amt< pow(10,3) then 'd- 100-1k $RUNE'
    when rune_amt>= pow(10,3) and rune_amt< pow(10,4) then 'e- 1k-10k $RUNE'
    when rune_amt>= pow(10,4) and rune_amt< pow(10,5) then 'f- 10k-100k $RUNE'
    when rune_amt>= pow(10,5) then 'g- 100k $RUNE+'
    end as distribution
    from thorchain.swaps
    where rune_usd != 0 )
    GROUP by 1
    -- where to_amount_usd is NULL
    LIMIT 100
    Run a query to Download Data