0xHaM-dTransactions by services
Updated 2025-01-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- forked from MLDZMN / activity by services @ https://flipsidecrypto.xyz/MLDZMN/q/fQrxp0_08eub/activity-by-services
-- with priceTb as (
-- SELECT
-- date_trunc('week',hour) as p_date,
-- -- HOUR::date as p_date,
-- -- HOUR,
-- SYMBOL,
-- -- price
-- avg(price) as avg_price
-- FROM gnosis.price.ez_prices_hourly
-- WHERE SYMBOL = 'OLAS'
-- GROUP by 1,2
-- )
with priceTb as (
select
date_trunc('week', date) as "Date",
price as "Price",
lag(price) over (order by "Date") as lag_price,
round(100*("Price"-lag_price)/lag_price,2) as "Price Change %"
from (
select
date_trunc(day, HOUR) as date,
price,
-- avg(PRICE) as price,
rank() over (partition by date_trunc('week', HOUR) order by HOUR desc) as rank
from gnosis.price.ez_prices_hourly
where SYMBOL='OLAS'
)
where rank=1
order by 1 desc
)
,
t1 as (
select
BLOCK_TIMESTAMP,
tx_hash,
QueryRunArchived: QueryRun has been archived