Query editor
WITH address AS (SELECT from_tron_address('TNHqDoi6Dj7Vpgjz7GJGWvf5qX6e3zUXQg') AS wallet),inbound AS (SELECTt."from" AS sender,COUNT(*) AS inbound_transfers,CAST(SUM(t.value) AS DOUBLE) / 1e6 AS total_usdt_received,MIN(t.evt_block_time) AS first_received,MAX(t.evt_block_time) AS last_receivedFROM tether_tron.Tether_USD_evt_transfer tCROSS JOIN address aWHERE t.evt_block_date >= DATE '2026-01-01'AND t."to" = a.walletAND t."from" <> a.walletGROUP BY 1),cex_tron AS (SELECTaddress,ARRAY_JOIN(ARRAY_AGG(DISTINCT cex_name), ', ') AS cex_namesFROM cex.addressesWHERE blockchain = 'tron'GROUP BY 1),labels_tron AS (SELECTaddress,MAX_BY(name, updated_at) AS address_label,ARRAY_JOIN(ARRAY_AGG(DISTINCT category), ', ') AS label_categoriesFROM labels.addressesWHERE blockchain = 'tron'GROUP BY 1)SELECTTO_TRON_ADDRESS(i.sender) AS sender_address,i.inbound_transfers,ROUND(i.total_usdt_received, 6) AS total_usdt_received,i.first_received,i.last_received,COALESCE(l.address_label, 'Unlabeled') AS address_label,COALESCE(l.label_categories, 'unlabeled') AS label_categoriesFROM inbound iLEFT JOIN cex_tron c ON i.sender = c.addressLEFT JOIN labels_tron l ON i.sender = l.addressWHERE c.address IS NULLORDER BY total_usdt_received DESC