Query editor
withoptions as (select optionamount, evt_block_time, premium, fee, seller as userfrom rysk_beyond_arbitrum.optionexchange_evt_optionssold socunion allselect optionamount, evt_block_time, premium, fee, buyer as userfrom rysk_beyond_arbitrum.optionexchange_evt_optionsbought),prices as (select *from prices.usdwhere symbol = 'ETH'and blockchain is null),trades as (select optionamount as _contractstraded,evt_block_time,premium as _premiumtraded,price,fee,userfrom options oinner join prices pon p.minute = date_trunc('minute', o.evt_block_time)),calendar as (select date_day, date_trunc('week', date_day) as weekfrom unnest(sequence(date('2023-07-26'), current_date, interval '1' day)) as dd(date_day)),first_interaction as (select user,min(date_trunc('day', evt_block_time)) as first_interaction_dayfrom optionswhere date_trunc('day', evt_block_time) >= date('2023-07-26')group by 1),interactions_by_day as (select date_trunc('day', evt_block_time) as date_day,count(distinct user) as Daily_Walletsfrom optionswhere date_trunc('day', evt_block_time) >= date('2023-07-26')group by 1),new as (select first_interaction_day as date_day,count(distinct user) as New_Walletsfrom first_interactiongroup by 1),traded as (select date_trunc('day', evt_block_time) as date_day,sum(_contractstraded * price) / power(10, 18) as notionalvolume,sum(_premiumtraded) / power(10, 6) as premium,sum(fee) / power(10, 6) as feefrom tradesgroup by 1)select c.date_day,notionalvolume,premium,