with data1 as (SELECT DISTINCT swap_to_asset_id
FROM flipside_prod_db.algorand.swaps
WHERE swap_from_asset_id IN ('386192725','386195940') AND date(block_timestamp)>'2022-04-01'
AND swap_to_Asset_id NOT IN ('0','386192725','386195940')),
data2 as (SELECT asset_id,asset_name
FROM flipside_prod_db.algorand.asset
WHERE asset_id IN (SELECT swap_to_asset_id from data1))
SELECT swap_to_asset_id, asset_name from data2 join data1 on data1.swap_to_asset_id = data2.asset_id