granadohoTop 10 Token by Amount of Swaps
    Updated 2022-01-27
    with tinyman_pool as (
    select
    address,
    asset_name
    from algorand.account_asset
    where (asset_name like '%Tinyman%' and asset_name like '%-ALGO%')
    ), asset_name as (
    select
    asset_id,
    asset_name,
    decimals
    from algorand.asset
    where decimals is not null
    ), count as (
    select
    tx_id,
    t.asset_name as tinyman_pool,
    asset_receiver,
    n.asset_id,
    n.asset_name as asset_received
    from algorand.asset_transfer_transaction
    inner join tinyman_pool t
    on sender = t.address
    inner join asset_name n
    on algorand.asset_transfer_transaction.asset_id = n.asset_id
    where tx_type = 'axfer'
    and asset_amount is not null
    and block_id in (select block_id from algorand.block where block_timestamp >= '2022-01-19')
    and inner_tx = 'FALSE'
    and asset_receiver not in (select address from tinyman_pool)
    )

    select
    asset_received,
    count(tx_id) as amount_of_swap
    from count
    Run a query to Download Data