sepehrmhz8Untitled Query
Updated 2022-06-26
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
›
⌄
with withdraws as (
SELECT
date_trunc('day',block_timestamp) as date,
SUM(eth_value) as "Amount Out (ETH)",
COUNT(DISTINCT to_address) as "Unique Withdrawers"
FROM ethereum.core.fact_traces
WHERE from_address = LOWER('0xae0Ee0A63A2cE6BaeEFFE56e7714FB4EFE48D419')
AND date > dateadd(day, -175, current_date())
GROUP BY 1
ORDER BY 1 DESC
),
deposits as (
SELECT
date_trunc('day',block_timestamp) as date,
COUNT(eth_from_address) as "Unique Depositors",
SUM(amount) as "Amount In (ETH)"
FROM ethereum.core.ez_eth_transfers
WHERE eth_to_address = LOWER('0xae0Ee0A63A2cE6BaeEFFE56e7714FB4EFE48D419')
AND date > dateadd(day, -175, current_date())
GROUP BY 1
ORDER BY 1 DESC
)
SELECT
w.date,
w."Unique Withdrawers",
d."Amount In (ETH)",
d."Unique Depositors",
w."Amount Out (ETH)"
FROM withdraws w
INNER JOIN deposits d ON w.date = d.date
ORDER BY date DESC
Run a query to Download Data