mucrypto24 hour change 2023-08-30 04:48 AM
Updated 2023-12-28
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
›
⌄
with resps as
(select defillama.get('/v2/historicalChainTvl', {}) as resp),
figure as (
select
value:date::timestamp as date,
value:tvl as tvl
from resps,
lateral flatten (input => resp:data)),
latest as (
select
date,
tvl as latest_tvl
from figure
order by date desc
limit 1),
prior as (
select
tvl as prior_tvl
from figure
order by date desc
offset 1
fetch next 1)
select
date,
latest_tvl,
prior_tvl,
(latest_tvl - prior_tvl) / prior_tvl * 100 as "24_h_change"
from latest
inner join prior
QueryRunArchived: QueryRun has been archived