Query editor
-- WHAT 30d/90d/365d change in total supply by coin and chain-- downstream-- query_: weekly net flows-- other-- query_6137451: computes cumulative supply by coin and chain-- query_6125407: computes weekly balances by coin and chain-- more efficinet as 1 query but less readable-- TODO: triangulate results --> weekly balances and sum of weekly balances needs to be rerun because stellar updateswith sum_values as (select * from query_8920613), cum_values as (select week, sum_balance, sum(sum_balance) over (order by week asc ) as cum_supplyfrom sum_values), pct_data as ( select *, lag(cum_supply, 4) over (order by week) as lag_30d, lag(cum_supply, 12) over (order by week) as lag_90d, lag(cum_supply, 52) over (order by week) as lag_365dfrom cum_values), change_data as ( select *, ((cum_supply - lag_30d )/lag_30d)*100 as pct_30d, ((cum_supply - lag_90d)/lag_90d)*100 as pct_90d, ((cum_supply - lag_365d)/lag_365d)*100 as pct_365dfrom pct_data)select week, pct_30d, pct_90d, pct_365d from change_data order by week desc