Query editor
WITH target_tokens (contract_address, token_symbol, decimals) AS (VALUES(0x55d398326f99059fF775485246999027B3197955, 'USDT', 18),(0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d, 'USD1', 18),(0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d, 'USDC', 18),(0x000Ae314E2A2172a039B26378814C252734f556A, 'ASTER', 18)),xpaymaster_txs AS (SELECThash AS tx_hash,"from" AS user_address,block_timeFROM bnb.transactionsWHERE "to" = 0x9886de0b07059245a4830942a98d912f5827d090AND bytearray_substring(data, 1, 4) = 0xa604d99fAND block_number >= 76364736),token_volumes AS (SELECTtt.token_symbol,SUM(CAST(e.value AS DOUBLE) / POWER(10, tt.decimals)) AS total_volumeFROM xpaymaster_txs xINNER JOIN erc20_bnb.evt_Transfer e ON x.tx_hash = e.evt_tx_hashINNER JOIN target_tokens tt ON e.contract_address = tt.contract_addressGROUP BY tt.token_symbol),user_stats AS (SELECTCOUNT(DISTINCT tx_hash) AS total_txs,COUNT(DISTINCT user_address) AS total_unique_usersFROM xpaymaster_txs)SELECTu.total_txs,u.total_unique_users,tv.token_symbol,tv.total_volumeFROM user_stats uCROSS JOIN token_volumes tvORDER BY tv.total_volume DESC