permarymarket cap
    Updated 2025-02-28
    with core_data as (
    select
    to_timestamp(value[0]::number/1000)::timestamp_ntz as date,
    value[1]::float as market_cap
    from (
    select livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/coins/coredaoorg/market_chart?vs_currency=usd&days=180&interval=daily&precision=full'
    ) as response
    ),
    lateral flatten(input => response:data:market_caps)
    )
    select
    date,
    market_cap,
    avg(market_cap) over (
    order by date
    rows between 30 preceding and current row
    ) as moving_avg_30d_mcap,
    ((select market_cap from core_data where date = current_date())) as current_market_cap
    from core_data
    order by date desc;
    Last run: about 2 months ago
    DATE
    MARKET_CAP
    MOVING_AVG_30D_MCAP
    CURRENT_MARKET_CAP
    1
    2025-02-28 17:38:28.000475981611.800131527033275.664867484857566.476003
    2
    2025-02-28 00:00:00.000484857566.476003531832237.288214484857566.476003
    3
    2025-02-27 00:00:00.000491537972.28113537800238.034454484857566.476003
    4
    2025-02-26 00:00:00.000491121131.986001546380408.944893484857566.476003
    5
    2025-02-25 00:00:00.000461873543.128478555500631.540069484857566.476003
    6
    2025-02-24 00:00:00.000516014363.524118565207490.363477484857566.476003
    7
    2025-02-23 00:00:00.000526327164.530003573502284.993696484857566.476003
    8
    2025-02-22 00:00:00.000533645892.793468581875405.638119484857566.476003
    9
    2025-02-21 00:00:00.000514484743.249361590481433.564085484857566.476003
    10
    2025-02-20 00:00:00.000506223792.680224598693923.592485484857566.476003
    11
    2025-02-19 00:00:00.000495091190.661869607464583.913849484857566.476003
    12
    2025-02-18 00:00:00.000529005854.243419620223831.164795484857566.476003
    13
    2025-02-17 00:00:00.000533393993.42804634761382.929621484857566.476003
    14
    2025-02-16 00:00:00.000547473887.17185647693539.348891484857566.476003
    15
    2025-02-15 00:00:00.000547465127.662151660756769.616137484857566.476003
    16
    2025-02-14 00:00:00.000505321677.638786671874355.577546484857566.476003
    17
    2025-02-13 00:00:00.000519267285.50076683449427.27295484857566.476003
    18
    2025-02-12 00:00:00.000512612698.628815696475808.101801484857566.476003
    19
    2025-02-11 00:00:00.000502717765.551125710637667.440356484857566.476003
    20
    2025-02-10 00:00:00.000495843629.847736724778857.686097484857566.476003
    ...
    181
    14KB
    2s