elsinaTop user with most LOCK Transaction copy copy
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
›
⌄
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
),
user as (
SELECT
tx_hash,
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
where
UNLOCK_TIMESTAMP is not null
)
SELECT
origin_from_address,
count(tx_hash) as tx_count,
COALESCE(SUM(volume_in_usd), 0) AS total_volume_in_usd
from user
group by origin_from_address
order by total_volume_in_usd desc
QueryRunArchived: QueryRun has been archived