Query editor
WITH rlusd AS (SELECT token_id FROM xrpl.tokensWHERE upper(currency_ascii) LIKE '%RLUSD%' OR upper(currency) LIKE '%RLUSD%'ORDER BY holders_count DESC LIMIT 1),monthly AS (SELECT date_trunc('month', h.ledger_close_date) AS mth,h.ledger_close_date, h.total_supply, h.total_holders,h.top_10_holders_percent, h.whale_accounts_count,row_number() OVER (PARTITION BY date_trunc('month', h.ledger_close_date) ORDER BY h.ledger_close_date DESC) rnFROM xrpl.token_holders_daily h JOIN rlusd r ON h.token_id=r.token_idWHERE h.ledger_close_date >= DATE '2024-12-01')SELECT cast(mth as date) AS month,cast(total_supply as bigint) AS supply,total_holders AS holders,round(top_10_holders_percent,1) AS top10_pct,whale_accounts_count AS whalesFROM monthly WHERE rn=1 ORDER BY mth