Query editor
select day,sum(bbtc) as bbtc,sum(hbtc) as hbtc,sum(obtc) as obtc,sum(pbtc) as pbtc,sum(renbtc) as renbtc,sum(sbtc) as sbtc,sum(tbtc) as tbtc,sum(tricrypto) as tricrypto,sum(tricrypto2) as tricrypto2,sum(ankreth) as ankreth,sum(reth) as reth,sum(seth) as seth,sum(steth) as steth,sum(eurs) as eurs,sum(link) as link,sum(threepool) as threepool,sum(aave) as aave,sum(alusd) as alusd,sum(busd) as busd,sum(busdv2) as busdv2,sum(compound) as compound,sum(dusd) as dusd,sum(frax) as frax,sum(gusd) as gusd,sum(husd) as husd,sum(ironbank) as ironbank,sum(linkusd) as linkusd,sum(lusd) as lusd,sum(mim) as mim,sum(musd) as musd,sum(pax) as pax,sum(rsv) as rsv,sum(saave) as saave,sum(susdv2) as susdv2,sum(tusd) as tusd,sum(usdk) as usdk,sum(usdn) as usdn,sum(usdp) as usdp,sum(usdt) as usdt,sum(ust) as ust,sum(y) as y,sum(sbtc + renbtc + susdv2 + busd + y + usdt + pax + compound + hbtc + threepool) as btc_total,sum(sbtc + renbtc + susdv2 + busd + y + usdt + pax + compound + hbtc + threepool) as eth_total,sum(sbtc + renbtc + susdv2 + busd + y + usdt + pax + compound + hbtc + threepool) as crypto_total,sum(sbtc + renbtc + susdv2 + busd + y + usdt + pax + compound + hbtc + threepool) as other_total,sum(sbtc + renbtc + susdv2 + busd + y + usdt + pax + compound + hbtc + threepool) as usd_total,sum(sbtc + renbtc + susdv2 + busd + y + usdt + pax + compound + hbtc + threepool) as totalfrom (-- bbtcselect date_trunc('day', evt_block_time) AS day,sum(casewhen sold_id = 0 then (tokens_sold / 1e8) * p.pricewhen sold_id = 1 then (tokens_sold / 1e18) * p.priceend) as bbtc, 0 as hbtc, 0 as obtc, 0 as pbtc, 0 as renbtc, 0 as sbtc, 0 as tbtc,