pietrektBTC Saver Depth
Updated 2025-05-08
99
1
2
3
4
5
6
7
8
9
10
11
12
›
⌄
WITH daily_saver_depth AS (SELECT to_date(block_timestamp) as day,
max(SPLIT(pool_name, '-')[0]) AS blockchain,
avg(POWER(10,-8) * asset_e8) AS asset_change_cumulative
FROM thorchain.defi.fact_block_pool_depths
WHERE (pool_name LIKE '%/%')
AND (pool_name = 'BTC/BTC')
GROUP BY day)
SELECT *, asset_change_cumulative - coalesce(lag(asset_change_cumulative) over (order by day), 0) as asset_change
FROM daily_saver_depth
WHERE day IS NOT NULL
ORDER BY day DESC
QueryRunArchived: QueryRun has been archived