Lordkingpolygon cex
Updated 2022-09-25
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
cex_polygon as
( select
address,
-- case when LABEL_SUBTYPE like '%group%' then 'others' else LABEL_SUBTYPE end as label,
PROJECT_NAME as LABEL
from polygon.core.dim_labels
where LABEL_TYPE = 'cex' )
, ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
inflow_polygon as
(select
BLOCK_TIMESTAMP::date as date ,
count(distinct ORIGIN_FROM_ADDRESS) as address ,
count(distinct TX_HASH) as trxs ,
sum(AMOUNT) as volume ,
sum(AMOUNT_USD) as USD ,
LABEL ,
'inflow_polygon' as title
from
polygon.core.ez_matic_transfers inner join cex_polygon
on ORIGIN_TO_ADDRESS = address
where BLOCK_TIMESTAMP::date > CURRENT_DATE -10
group by date ,title ,label )
, ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
outflow_polygon as
(select
BLOCK_TIMESTAMP::date as date ,
count(distinct ORIGIN_FROM_ADDRESS) as address ,
count(distinct TX_HASH) as trxs ,
sum(AMOUNT) as volume ,
sum(AMOUNT_USD) as USD ,
LABEL ,
'outflow_polygon' as title
Run a query to Download Data