nitsKatana wLUNA pools
    Updated 2022-02-20
    SELECT distribution, sum(total_vol), count(DISTINCT addr) as unique_addresses
    from
    (SELECT addr, sum(amt) as total_vol,
    case when total_vol = '0' then 'a-no luna'
    when total_vol < pow(10,0) then 'b-less than 1'
    when total_vol < pow(10,1) and total_vol >= pow(10,0) then '1-10'
    when total_vol < pow(10,2) and total_vol >= pow(10,1) then '10-100'
    when total_vol < pow(10,3) and total_vol >= pow(10,2) then '100-1k'
    when total_vol < pow(10,4) and total_vol >= pow(10,3) then '1k-10k'
    when total_vol < pow(10,5) and total_vol >= pow(10,4) then '10k-100k'
    when total_vol < pow(10,6) and total_vol >= pow(10,5) then '100k-1M'
    when total_vol >= pow(10,6) then '1M+'
    end as distribution
    from
    (SELECT *,inner_instruction:instructions[1]:parsed:info:amount/pow(10,6) as amt, inner_instruction:instructions[1]:parsed:info:destination as addr
    from solana.events
    where inner_instruction:instructions[0]:parsed:info:mint = '3JU8iPVMrrhmct4RP7rTSBFwStv6oksEsSj4C6mkk2Yg'
    and inner_instruction:instructions[0]:parsed:info:authority = 'FzJ3VxEBuKxpX6meAWtFeAmoGjN8xw8fVNnArKwDp4os'
    and inner_instruction:instructions[0]:parsed:type = 'burn'
    and block_timestamp > '2022-02-04'
    )
    GROUP by 1)
    GROUP by 1
    limit 10