winnie-fsmolecular-tomato
Updated 2024-09-19
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
WITH near_prices AS (
SELECT
hour,
open,
high,
low,
close
FROM price.fact_prices_ohlc_hourly
WHERE asset_id = 'near' -- This is the asset_id for NEAR in the price schema
AND provider = 'coinmarketcap' -- Using CoinMarketCap as the price provider
AND hour >= CURRENT_DATE - INTERVAL '7 days' -- Last 7 days of data
)
SELECT
hour,
open,
high,
low,
close,
(close - open) / open AS price_change_percentage
FROM near_prices
ORDER BY hour DESC
LIMIT 24;
QueryRunArchived: QueryRun has been archived