Query editor
WITH metaswap_txn AS (SELECTtokenFrom,call_tx_hashFROM metamask_ethereum.MetaSwap_call_swapWHEREcall_success = TRUEAND CARDINALITY(call_trace_address) = 0AND (call_block_number = 11301308OR call_block_number = 11915850OR call_block_number = 12759185OR call_block_number = 13610784OR call_block_number = 15452269OR call_block_number = 16249918OR call_block_number = 16673439OR call_block_number = 16673476OR call_block_number = 17190932OR call_block_number = 17194594OR call_block_number = 17274796OR call_block_number = 17424461OR call_block_number = 20845808OR call_block_number = 21258730)), distinct_txn AS (SELECT DISTINCTtoken_received,tx_hashFROM dune.arijit_ad.result_metaswap_all_recipient)SELECTdistinct_txn.token_received,COUNT(*) AS txn_count,MAX(distinct_txn.tx_hash) AS one_tx_hashFROM distinct_txnJOIN metaswap_txnON distinct_txn.tx_hash = metaswap_txn.call_tx_hashWHEREdistinct_txn.token_received <> metaswap_txn.tokenFromGROUP BYdistinct_txn.token_receivedORDER BYtxn_count DESC