Query editor
-- Fees: Tempo gas is USD-denominated. gas_price is the effective gas price in-- attodollars (USD * 1e18 per gas). TIP-20 tokens have 6 decimals, so fees are-- computed as ceil(gas_used * gas_price / 1e12) microdollars, then / 1e6 for USD.-- Verified against explorer receipts: matches displayed fee to the microdollar.---- Contracts deployed: count rows in creation_traces (each row = one deployed-- contract), not DISTINCT tx_hash — a single tx can create multiple contracts.-- Note: tempo.creation_traces has no block_date column; use block_time and-- prune on block_month (partition column) for cost efficiency.---- System txns: we exclude from = 0x0 (block-level system transactions) on user--- facing activity metrics, but include them for contract deployments since genesis-- and system-deployed predeploys are valid on-chain deployments.---- Unique users: union of senders (from) and receivers (to), deduplicated.-- This is the most inclusive framing — an address counts as a "user" whether-- they initiated a tx or merely received one. total_senders / total_receivers-- remain available for narrower framings.WITH all_time AS (SELECTCOUNT(*) AS total_txns,COUNT(DISTINCT "from") AS total_senders,COUNT(DISTINCT "to") AS total_receivers,SUM(CEIL(CAST(gas_used AS double) * CAST(gas_price AS double) / 1e12)) / 1e6 AS total_fees_usd,COUNT(CASE WHEN success THEN 1 END) AS total_successful,COUNT(CASE WHEN NOT success THEN 1 END) AS total_failed,CAST(COUNT(CASE WHEN success THEN 1 END) AS double)/ NULLIF(COUNT(*), 0) * 100 AS success_rate_pctFROM tempo.transactionsWHERE "from" != 0x0000000000000000000000000000000000000000AND block_date >= DATE '2026-03-18'),-- Unique users (all-time) = distinct addresses seen as either sender or receiver.all_time_users AS (SELECT COUNT(DISTINCT address) AS total_usersFROM (SELECT "from" AS addressFROM tempo.transactionsWHERE "from" != 0x0000000000000000000000000000000000000000AND block_date >= DATE '2026-03-18'UNIONSELECT "to" AS addressFROM tempo.transactionsWHERE "from" != 0x0000000000000000000000000000000000000000AND "to" IS NOT NULLAND block_date >= DATE '2026-03-18')),last_24h AS (SELECTCOUNT(*) AS txns_24h,COUNT(DISTINCT "from") AS senders_24h,SUM(CEIL(CAST(gas_used AS double) * CAST(gas_price AS double) / 1e12)) / 1e6 AS fees_usd_24h,COUNT(CASE WHEN NOT success THEN 1 END) AS failed_24h