nitsTop 10 assets to swap to
    Updated 2022-05-01
    with from_ as (SELECT swap_to_asset_id, count(*) as total_txs,
    sum(swap_from_amount) as total_amt, 'swap from gALGO' as action from algorand.swaps
    where swap_from_asset_id = '694432641' and date(block_timestamp) >= '2022-01-01'
    GROUP by 1 ),
    to_ as (SELECT swap_from_asset_id, count(*) as total_txs,
    sum(swap_to_amount) as total_amt, 'swap to gALGO' as action
    from algorand.swaps
    where swap_to_asset_id = '694432641' and date(block_timestamp) >= '2022-01-01'
    GROUP by 1 )
    SELECT *, case when swap_to_asset_id = '0' then 'algo' else 'yieldly' end as asset_name
    from
    (SELECT * from from_
    order by 2 desc )
    limit 10
    Run a query to Download Data