Query editor
-- with cex filtering: cb:16.8%WITH onramps AS (SELECTuser_address,block_time,provider,provider_type,date_trunc('month', block_time) as block_monthFROM dune.meso_team.result_onramp_transactions_last_12_moWHERE blockchain = 'ethereum'and provider_type in ('on-ramp', 'major-cex')), activity as (SELECTort.user_address,ort.block_month,ort.provider,ort.provider_type,date_diff('second', ort.block_time, tx.block_time) AS seconds_diffFROM onramps ortINNER JOIN ethereum.transactions txON tx.data != 0xAND tx."from" = ort.user_addressAND tx.block_time >= ort.block_timeAND tx.block_time <= ort.block_time + INTERVAL '8' hour), activity_data as (selectblock_month,provider,COUNT(DISTINCT user_address) AS active_users_15minfrom activityWHERE seconds_diff < (15 * 60)group by 1,2order by 1 desc), monthly_data as (selectort.block_month,ad.provider,max(ad.active_users_15min) as active_users_15min,count(distinct ort.user_address) as total_usersfrom onramps ortjoin activity_data ad on ad.block_month = ort.block_monthgroup by 1,2order by block_month desc)selectblock_month,provider,active_users_15min/cast(total_users as double) as user_share_15m_activefrom monthly_dataorder by block_month desc