amiroza10 most popular assets users have swapped to in 2022
    Updated 2022-03-21
    with asset_id_swaps as (
    select swap_to_asset_id,count(swap_to_asset_id ) count
    from Algorand.Swaps
    where date_trunc('day',block_timestamp)>='2022-01-01 00:00:00.000'
    and swap_from_amount> 0
    group by 1
    order by 2 desc
    limit 10
    )

    select t2.asset_name,t1.count
    from asset_id_swaps t1
    inner join Algorand.asset t2 on t2.asset_id = t1.swap_to_asset_id

    Run a query to Download Data