Query editor
-- BWR Data - Maple - OTC Revenue (Smoothed) (v4, 2026-11-12, DATA-329)---- Through 2025-09-30: Maple's daily upload, each payment spread back to the previous payment date.-- From 2025-10-01: Maple reports OTC monthly (otc_net_revenue); each month is spread evenly across-- its days. OTC ended September 2026. Maple's last published month is May 2026; later months stay absent.with otc_daily as (selectcast(from_unixtime(timestamp) as date) as dt,sum(coalesce(otc_revenue, 0)) as otc_revenuefrom dune."maple-finance".dataset_maple_otc_by_daywhere otc_revenue is not nullgroup by 1),otc_with_prev as (selectdt,otc_revenue,coalesce(lag(dt) over (order by dt),date_add('day', -1, dt)) as raw_prev_dtfrom otc_daily),otc_spread as (selectt.dt,cast(o.otc_revenue as double) / date_diff('day', anchor_prev_dt, o.dt) as otc_revenuefrom (selectdt,otc_revenue,casewhen raw_prev_dt < dt then raw_prev_dtelse date_add('day', -1, dt)end as anchor_prev_dtfrom otc_with_prev) ocross join unnest(sequence(date_add('day', 1, anchor_prev_dt),o.dt,interval '1' day)) as t(dt)),otc_monthly as (selectd.dt,m.otc_net_revenue / day(last_day_of_month(m.month_dt)) as otc_revenuefrom (selectcast(substr(month, 1, 10) as date) as month_dt,otc_net_revenuefrom dune."maple-finance".dataset_dune_monthly_historicalwhere otc_net_revenue is not null) mcross join unnest(sequence(m.month_dt,last_day_of_month(m.month_dt),interval '1' day)) as d(dt)