Query editor
/*-- @title: DSR Balance & Rate-- @author: Steakhouse Financial-- @description: Displays the latest 12-month trends in DAI balances within the Dai Savings Rate (DSR) system and the corresponding DSR rates,showing changes in user engagement and interest yield dynamics-- @notes: N/A-- @version:- 1.0 - 2023-07-12 - Initial version- 2.0 - 2024-06-04 - Added header + code refactoring- 3.0 - 2024-10-08 - Added USDS and SKY Savings Rate*/withdeltas as (-- DAIselectdst as address,date(evt_block_time) as dt,cast(wad as double) as deltafrom maker_ethereum.DAI_evt_Transferunion allselectsrc as address,date(evt_block_time) as dt,-cast(wad as double) as deltafrom maker_ethereum.DAI_evt_Transferunion allselect0x197e90f9fad81970ba7976f33cbd77088e5d7cf7 as address,date(call_block_time) as dt,cast(rad as double) / 1e27 as deltafrom maker_ethereum.VAT_call_movewhere call_successand dst = 0x197e90f9fad81970ba7976f33cbd77088e5d7cf7union allselect0x197e90f9fad81970ba7976f33cbd77088e5d7cf7 as address,date(call_block_time) as dt,-cast(rad as double) / 1e27 as deltafrom maker_ethereum.VAT_call_movewhere call_successand src = 0x197e90f9fad81970ba7976f33cbd77088e5d7cf7union allselect0x197e90f9fad81970ba7976f33cbd77088e5d7cf7 as address,date(call_block_time) as dt,cast(rad as double) / 1e27 as deltafrom maker_ethereum.VAT_call_suckwhere call_successand v = 0x197e90f9fad81970ba7976f33cbd77088e5d7cf7-- USDSunion allselect"to" AS address,date(evt_block_time) AS dt,cast(value as double) AS deltaFROM sky_ethereum.USDS_evt_TransferUNION ALLSELECT"from" AS address,