Query editor
-- [MVP] USDT monthly activity: Ethereum vs Tron.-- RAW Dune decoded Transfer events (NOT Visa/Allium Adjusted data).-- Period: [2021-08-01, 2026-08-01) = 60 completed months (current month excluded).---- Official USDT contracts, explicitly restricted below (NOT relying on the decoded namespace):-- Ethereum official USDT: 0xdac17f958d2ee523a2206206994597c13d831ec7-- Tron official USDT : 0xa614f803b6fd780986a42c78ec9c7f77e6ded13c (base58 TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t)-- Both tokens use 6 decimals (confirmed via tokens.erc20); amounts = value / 1e6.-- The contract_address filter is DEFENSIVE: even though each decoded table currently looks single-contract,-- other contracts can be added to these namespaces later. C-03 found NEC (an 18-decimal token) contaminating-- tether_ethereum.tether_usd_evt_transfer and inflating amount totals by 10^12.---- approx_unique_tx_count / approx_unique_sender_count / approx_unique_receiver_count / approx_median_amount-- are APPROXIMATE (approx_distinct / approx_percentile). Address counts are ADDRESSES, NOT users.WITH dec AS (SELECT blockchain, decimalsFROM tokens.erc20WHERE blockchain IN ('ethereum','tron')AND contract_address IN (0xdac17f958d2ee523a2206206994597c13d831ec7,0xa614f803b6fd780986a42c78ec9c7f77e6ded13c)),eth AS (SELECTdate_trunc('month', evt_block_time) AS month,evt_tx_hash AS tx_hash,"from" AS addr_from,"to" AS addr_to,CAST(value AS double) / power(10, COALESCE((SELECT decimals FROM dec WHERE blockchain = 'ethereum'), 6)) AS amt_usdtFROM tether_ethereum.tether_usd_evt_transferWHERE evt_block_time >= TIMESTAMP '2021-08-01 00:00:00'AND evt_block_time < TIMESTAMP '2026-08-01 00:00:00'AND evt_block_date >= DATE '2021-08-01'AND evt_block_date < DATE '2026-08-01'AND contract_address = 0xdac17f958d2ee523a2206206994597c13d831ec7 -- Ethereum official USDTAND "from" <> 0x0000000000000000000000000000000000000000AND "to" <> 0x0000000000000000000000000000000000000000AND "from" <> "to"),tron AS (SELECTdate_trunc('month', evt_block_time) AS month,evt_tx_hash AS tx_hash,"from" AS addr_from,"to" AS addr_to,CAST(value AS double) / power(10, COALESCE((SELECT decimals FROM dec WHERE blockchain = 'tron'), 6)) AS amt_usdtFROM tether_tron.tether_usd_evt_transferWHERE evt_block_time >= TIMESTAMP '2021-08-01 00:00:00'AND evt_block_time < TIMESTAMP '2026-08-01 00:00:00'AND evt_block_date >= DATE '2021-08-01'AND evt_block_date < DATE '2026-08-01'AND contract_address = 0xa614f803b6fd780986a42c78ec9c7f77e6ded13c -- Tron official USDT (base58 TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t)AND "from" <> 0x0000000000000000000000000000000000000000AND "to" <> 0x0000000000000000000000000000000000000000AND "from" <> "to"),