drone-mostafamaker copy copy
Updated 2023-05-09
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
›
⌄
with price as (SELECT
date_trunc ('WEEK',HOUR) as tIME,SYMBOL,
avg (price) as Price
FROM crosschain.core.ez_hourly_prices
GROUP BY 1,2),
final as (SELECT
'Deposit' AS TYPE,
d.SYMBOL,
count (DISTINCT TX_HASH) as TXN,
count (DISTINCT DEPOSITOR) as Users,
sum (AMOUNT_DEPOSITED * price) as USD
FROM ethereum.maker.ez_deposits d
LEFT JOIN price P on (tIME = date_trunc ('WEEK',BLOCK_TIMESTAMP) and d.SYMBOL = p.SYMBOL)
WHERE TX_STATUS = 'SUCCESS'
GROUP BY 1,2)
SELECT * FROM final WHERE users > 10
Run a query to Download Data