Abbas_ra21Untitled Query
Updated 2022-09-20
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 ETH AS (
select
SYMBOL,
sum(Amount) AS "Token Amount",
sum(AMOUNT_USD) AS "USD Amount"
from ethereum.core.ez_token_transfers
where FROM_ADDRESS='0xd152f549545093347a162dce210e7293f1452150'
and TO_ADDRESS='0xab4fc9dd5020848b84fa363707e210db7b74964b'
group by 1
union ALL
select
'ETH' AS SYMBOL,
sum(Amount) AS "Token Amount",
sum(AMOUNT_USD) AS "USD Amount"
from ethereum.core.ez_eth_transfers
where ETH_FROM_ADDRESS='0xd152f549545093347a162dce210e7293f1452150'
and ETH_TO_ADDRESS='0xab4fc9dd5020848b84fa363707e210db7b74964b'
group by 1
),
polygon AS (
select
PROJECT_NAME AS symbol,
sum(RAW_AMOUNT/1e6) AS "Token Amount",
sum(AW_AMOUNT/1e6) AS "USD Amount"
from polygon.core.fact_token_transfers inner join polygon.core.dim_labels on CONTRACT_ADDRESS=ADDRESS
where FROM_ADDRESS='0xd152f549545093347a162dce210e7293f1452150'
and TO_ADDRESS='0xab4fc9dd5020848b84fa363707e210db7b74964b'
group by 1
union ALL
select
'Matic' AS SYMBOL,
sum(Amount) AS "Token Amount",
sum(AMOUNT_USD) AS "USD Amount"
from polygon.core.ez_matic_transfers
where MATIC_FROM_ADDRESS='0xd152f549545093347a162dce210e7293f1452150'
and MATIC_TO_ADDRESS='0xab4fc9dd5020848b84fa363707e210db7b74964b'
Run a query to Download Data