Query editor
/* Hackathon projects $VMT per source tag per month (USD) — plot-ready(x = month, y = volume_usd, series = source_tag).Scope: XRPL source tags matching the hackathon platform's deterministicYYMMDD#### format, restricted to year 2025-2026 (yy 25-26), month 1..12,day 1..31, counter 1..9999. Note: source tags are not inherentlydiscriminating, so unrelated apps issuing a tag in this band can stillappear — switch to an explicit tag allow-list for an exact scope.Valuation: successful native XRP Payments valued at the daily USD price.Partial payments are excluded (tfPartialPayment flag = 0x20000). */WITH xrp_daily AS (SELECT CAST(minute AS DATE) AS day, AVG(price) AS xrp_usdFROM prices.usdWHERE symbol = 'XRP'GROUP BY 1),priced_payments AS (SELECTDATE_TRUNC('month', t.ledger_close_date) AS month,CAST(t.ledger_close_date AS DATE) AS day,t.source_tag,CAST(t.amount.value AS DOUBLE) / 1e6 AS xrp_equivFROM xrpl.transactions tWHERE t.transaction_type = 'Payment'AND t.amount.currency = 'XRP'AND t.result = 'tesSUCCESS'AND bitwise_and(COALESCE(t.flags, 0), 131072) = 0AND t.ledger_close_date >= DATE '2025-01-01'AND t.source_tag BETWEEN 2500000000 AND 2699999999AND (t.source_tag % 10000) BETWEEN 1 AND 9999AND ((t.source_tag / 10000) % 100) BETWEEN 1 AND 31AND ((t.source_tag / 1000000) % 100) BETWEEN 1 AND 12)SELECTp.month,p.source_tag,SUM(p.xrp_equiv * x.xrp_usd) AS volume_usdFROM priced_payments pLEFT JOIN xrp_daily x ON x.day = p.dayGROUP BY 1, 2ORDER BY p.month, volume_usd DESC;