KaskoazulWhales Swapping - Swapped from
    Updated 2022-04-15
    with whales as (
    select address
    from algorand.account
    where account_closed = 'FALSE'
    and balance >266880
    ),

    swap_from as (
    select --swap_from_asset_id,
    --asset_name,
    block_timestamp::date as fecha,
    case
    when swap_from_asset_id = 0 then 'ALGO'
    else asset_name
    end as asset,
    sum (swap_from_amount) as volume_swapped,
    count (distinct tx_group_id) as number_of_swaps
    from algorand.swaps s
    left join algorand.asset a
    on s.swap_from_asset_id = a.asset_id
    where swapper in (select address from whales)
    and block_timestamp >= '2022-01-01'
    group by 1,2
    order by 4 desc
    )

    select *
    from swap_from