maybeyonasthor_new_onboard_type_overall
    Updated 2022-06-25
    with
    first_rune_transfer_in as (
    select
    to_address,
    min(block_timestamp) as first_transfer
    from thorchain.transfers
    where asset = 'THOR.RUNE'
    group by 1
    ),
    proper_rune_transfers as(
    select
    f.to_address,
    f.first_transfer,
    from_address,
    case from_address
    when 'thor1ty6h2ll07fqfzumphp6kq3hm4ps28xlm2l6kd6' then 'crypto.com withdrawal'
    when 'thor1t60f02r8jvzjrhtnjgfj4ne6rs5wjnejwmj7fh' then 'binance withdrawal' --cold
    when 'thor1uz4fpyd5f5d6p9pzk8lxyj4qxnwq6f9utg0e7k' then 'binance withdrawal' --hot
    when 'thor1g98cy3n9mmjrpn0sxmn63lztelera37n8n67c0' then 'swap'
    when 'thor1v8ppstuf6e3x0r4glqc68d5jqcs2tf38cg2q6y' then 'rune upgrade'
    else 'other wallets' end as from_type,
    rune_amount,
    rune_amount_usd
    from thorchain.transfers t join first_rune_transfer_in f
    on t.block_timestamp=f.first_transfer and t.to_address=f.to_address
    -- where f.to_address = 'thor1dparla595kzgge6ht05662z8my5w9es6e4r4u4'
    ),
    swap_from as (
    select
    block_timestamp,
    native_to_address,
    from_asset,
    to_amount,
    to_amount_usd
    from thorchain.swaps
    where to_asset = 'THOR.RUNE'
    Run a query to Download Data