blocmates researchtotal crypto market cap
    Updated 3 days ago
    with all_date as (
    SELECT
    coingecko.get(
    '/api/v3/global/market_cap_chart',
    { 'days': '1997' }
    ) as resp
    ),
    manual_data AS (
    SELECT
    TO_TIMESTAMP_NTZ('2020-04-28 00:00:00.000') AS date,
    220280000000.0 AS total_crypto_marketcap
    UNION
    ALL
    SELECT
    TO_TIMESTAMP_NTZ('2020-04-29 00:00:00.000'),
    244000000000.0
    )
    SELECT
    TO_TIMESTAMP_NTZ(f.value [0] :: NUMBER / 1000) AS date,
    f.value [1] :: FLOAT AS total_crypto_marketcap
    FROM
    all_date,
    LATERAL FLATTEN(
    input => all_date.resp:data.market_cap_chart.market_cap
    ) AS f
    UNION
    ALL
    SELECT
    *
    FROM
    manual_data
    Last run: 3 days ago
    DATE
    TOTAL_CRYPTO_MARKETCAP
    1
    2019-09-23 00:00:00.000265799013196.776
    2
    2019-09-24 00:00:00.000255546602708.314
    3
    2019-09-25 00:00:00.000224433839171.986
    4
    2019-09-26 00:00:00.000222043149919.647
    5
    2019-09-27 00:00:00.000213656237820.242
    6
    2019-09-28 00:00:00.000217377148880.98
    7
    2019-09-29 00:00:00.000218171329333.685
    8
    2019-09-30 00:00:00.000213666064230.992
    9
    2019-10-01 00:00:00.000220990720671.047
    10
    2019-10-02 00:00:00.000220587315079.226
    11
    2019-10-03 00:00:00.000222726560335.238
    12
    2019-10-04 00:00:00.000219507406061.573
    13
    2019-10-05 00:00:00.000217794386499.579
    14
    2019-10-06 00:00:00.000218188714615.181
    15
    2019-10-07 00:00:00.000211952886308.571
    16
    2019-10-08 00:00:00.000221554972380.266
    17
    2019-10-09 00:00:00.000221634088510.965
    18
    2019-10-10 00:00:00.000231825518109.595
    19
    2019-10-11 00:00:00.000230180759129.739
    20
    2019-10-12 00:00:00.000222398047975.365
    ...
    1995
    87KB
    5s