Query editor
withpot_calls as (selectcall_block_time as time,cast(output_tmp as double) / 1e27 as chi,null as wad,null as dsrfrommaker_ethereum.pot_call_dripwherecall_successunion allselectcall_block_time,null,cast(wad as double) / 1e18,nullfrommaker_ethereum.pot_call_joinwherecall_successand wad != 0union allselectcall_block_time,null,- cast(wad as double) / 1e18,nullfrommaker_ethereum.pot_call_exitwherecall_successand wad != 0union allselectcall_block_time,null,null,pow(cast(data as double) / 1e27, 365 * 24 * 60 * 60) - 1frommaker_ethereum.pot_call_filewherecall_successand data is not null),sampling as (selectdate_trunc('day', time) as time,sum(wad) as wad,max_by(chi, time) filter(wherechi is not null) as chi,max_by(dsr, time) filter(wheredsr is not null) as dsrfrompot_callsgroup by