mucryptoTVL and 24 hour change over the last year 2023-08-30 05:15 AM
    Updated 2024-01-23
    with resps as
    (select defillama.get('/v2/historicalChainTvl', {}) as resp),

    rn as (
    select
    value:date::timestamp as date,
    value:tvl as tvl,
    row_number() over (order by date desc) as rn
    from resps,
    lateral flatten (input => resp:data))

    select
    c1.date,
    c1.tvl,
    (c1.tvl - c2.tvl) / c2.tvl * 100 as "24_h_change"
    from rn as c1
    left join rn as c2
    on c1.rn = c2.rn - 1
    order by 1 desc
    limit 365
    Last run: about 1 year ago
    DATE
    TVL
    24_h_change
    1
    2024-01-23 00:00:00.000
    53842714817.61765
    -5.040175888
    2
    2024-01-22 00:00:00.000
    56700520795.02342
    -1.70768077
    3
    2024-01-21 00:00:00.000
    57685606809.85922
    0.4722546036
    4
    2024-01-20 00:00:00.000
    57414464358.79466
    -0.5971122822
    5
    2024-01-19 00:00:00.000
    57759352546.95093
    -1.309437096
    6
    2024-01-18 00:00:00.000
    58525709902.9379
    0.6841813578
    7
    2024-01-17 00:00:00.000
    58128008902.35375
    0.1433521752
    8
    2024-01-16 00:00:00.000
    58044800418.367615
    -0.757407827
    9
    2024-01-15 00:00:00.000
    58487791529.22349
    -0.07247791627
    10
    2024-01-14 00:00:00.000
    58530213008.00259
    0.8891112522
    11
    2024-01-13 00:00:00.000
    58014400445.739296
    -3.336162219
    12
    2024-01-12 00:00:00.000
    60016653360.45183
    -0.8142929191
    13
    2024-01-11 00:00:00.000
    60509376932.2041
    6.345035759
    14
    2024-01-10 00:00:00.000
    56899108172.35675
    2.835080132
    15
    2024-01-09 00:00:00.000
    55330445699.364456
    2.870142533
    16
    2024-01-08 00:00:00.000
    53786691003.91932
    -0.9371204804
    17
    2024-01-07 00:00:00.000
    54295505304.07971
    0.1510906713
    18
    2024-01-06 00:00:00.000
    54213593621.53047
    -1.128136104
    19
    2024-01-05 00:00:00.000
    54832175186.16019
    1.570957788
    20
    2024-01-04 00:00:00.000
    53984107642.66708
    -4.585259884
    ...
    365
    21KB
    3s