kky111Ethereum Balance Transactions
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 incoming AS (
SELECT dt, sum(amount) as amount FROM (
SELECT
--t.to_address AS address,
date(block_timestamp) as dt,
t.tx_hash,
t.raw_amount/ 1e18 as amount
FROM ethereum.core.fact_token_transfers t
WHERE
t.block_timestamp >= '2021-01-01'
AND t.contract_address = '0xa3ee21c306a700e682abcdfe9baa6a08f3820419'
AND t.to_address IN ('0xb00c9b1771cf6ae791e6476810b19c77f0457b2d')
GROUP BY 1,2,3
) sub
GROUP BY 1
ORDER BY 1 DESC
)
select *
from incoming
, outgoing AS (
SELECT address, sum(amount) as amount FROM (
SELECT
t.from_address AS address,
tx_hash,
t.raw_amount/ 1e18 as amount
FROM ethereum.core.fact_token_transfers t
WHERE
t.block_timestamp >= '2021-01-01'
AND t.contract_address = '0xa3ee21c306a700e682abcdfe9baa6a08f3820419'
AND t.from_address IN ('0xb00c9b1771cf6ae791e6476810b19c77f0457b2d')
GROUP BY 1,2,3
) sub
GROUP BY 1
)
Run a query to Download Data