elsinajolly-violet
Updated 2024-07-25
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
›
⌄
with hourly_prices as (
select
date_trunc('day', hour) as d,
avg(price) as avg_price
from crosschain.price.ez_prices_hourly
where symbol = 'OLAS'
and blockchain = 'ethereum'
group by d
)
-- ,
-- transactions_with_prices as (
select
block_timestamp,
t.tx_hash,
t.origin_from_address,
t.olas_amount * p.avg_price as volume_in_usd
from crosschain.olas.ez_olas_locking t
join hourly_prices p on block_timestamp::date = p.d
-- )
-- SELECT
-- COUNT(DISTINCT tx_hash) AS total_transaction_count,
-- COUNT(DISTINCT origin_from_address) AS unique_buyer_count,
-- SUM(volume_in_usd) AS total_transaction_volume
-- FROM
-- transactions_with_prices
-- WHERE
-- block_timestamp::date = current_date - interval '1 day'
QueryRunArchived: QueryRun has been archived