Omni Labs2024-02-22 02:54 PM
    Updated 2024-02-22
    with

    -- price as (
    -- select
    -- date_trunc('day',hour) as time,
    -- avg(price) as price
    -- from
    -- ethereum.price.ez_hourly_token_prices
    -- where
    -- date(hour) >= date('2016-01-01')
    -- and token_address = '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599'
    -- group by
    -- 1
    -- order by
    -- 1 desc
    -- )

    price as (
    select
    date_trunc('week',hour) as time,
    avg(price) as price
    from
    bitcoin.price.ez_hourly_token_prices
    where
    date(hour) >= date('2017-01-01')
    group by
    1
    order by
    1 desc
    )

    select * from price
    Last run: about 1 year ago
    TIME
    PRICE
    1
    2024-02-19 00:00:00.00051796.510544893
    2
    2024-02-12 00:00:00.00050964.428571429
    3
    2024-02-05 00:00:00.00045151.863095238
    4
    2024-01-29 00:00:00.00042892.791666667
    5
    2024-01-22 00:00:00.00040705.095238095
    6
    2024-01-15 00:00:00.00042144.158759036
    7
    2024-01-08 00:00:00.00044937.31988026
    8
    2024-01-01 00:00:00.00043890.583333333
    9
    2023-12-25 00:00:00.00042685.678216409
    10
    2023-12-18 00:00:00.00043162.947772939
    11
    2023-12-11 00:00:00.00042085.238095238
    12
    2023-12-04 00:00:00.00043259.530015716
    13
    2023-11-27 00:00:00.00038175.541666667
    14
    2023-11-20 00:00:00.00037354.345238095
    15
    2023-11-13 00:00:00.00036548.321428571
    16
    2023-11-06 00:00:00.00036149.178571429
    17
    2023-10-30 00:00:00.00034714.910118914
    18
    2023-10-23 00:00:00.00033718.636904762
    19
    2023-10-16 00:00:00.00028911.398809524
    20
    2023-10-09 00:00:00.00027088.80952381
    ...
    374
    16KB
    1s