Query editor
with modalTroveSize as (selectmode() within group (order by _coll/1e18) as troveSizefrom liquity."BorrowerOperations_evt_TroveUpdated" where operation = 0),totalTroves as (select count(1) as totalTroves from liquity."BorrowerOperations_evt_TroveUpdated" where operation = 0)selectsum(troveSize)/count(1) as troveSize,count(1) as frequency,(select totalTroves from totalTroves) as totalTrovesfrom modalTroveSizejoin liquity."BorrowerOperations_evt_TroveUpdated"on operation = 0 and _coll/1e18 = modalTroveSize.troveSize