0xasmrTop ETH Depositors BendDAO
Updated 2022-09-04
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
›
⌄
WITH eth_deposits_raw AS (
SELECT
date_trunc('hour', block_timestamp) AS hour,
from_address AS user,
eth_value AS eth_deposited
FROM ethereum.core.fact_transactions
WHERE to_address = '0x3b968d2d299b895a5fcf3bba7a64ad0f566e6f88'
AND origin_function_signature = '0x58c22be7'
AND block_timestamp >= CURRENT_DATE - interval '1 month'
),
eth_deposits_usd AS(
SELECT
d.user,
d.eth_deposited,
p.price
FROM eth_deposits_raw d
INNER JOIN ethereum.core.fact_hourly_token_prices p
ON p.hour = d.hour
WHERE p.symbol = 'WETH'
)
SELECT
user,
SUM(eth_deposited) AS total_eth_deposited,
SUM(eth_deposited*price) AS total_eth_deposited_usd
FROM eth_deposits_usd
GROUP BY 1
ORDER BY 2 DESC
LIMIT 10
Run a query to Download Data