MLDZMNTerminate position
Updated 2022-06-28
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
›
⌄
with tb1 as (select
ADDRESS_NAME as tokens,
CONTRACT_ADDRESS,
sum(RAW_AMOUNT) as amount,
count(distinct TO_ADDRESS) as distinct_users,
count(distinct TX_HASH) as countt
from polygon.core.fact_token_transfers x
join flipside_prod_db.polygon.labels y on x.CONTRACT_ADDRESS=y.ADDRESS
where FROM_ADDRESS='0x059d306a25c4ce8d7437d25743a8b94520536bd5' and ORIGIN_FUNCTION_SIGNATURE='0x72ada4c5'
and BLOCK_TIMESTAMP>=CURRENT_DATE-30
group by 1,2)
select
tokens,
case when CONTRACT_ADDRESS='0x2791bca1f2de4661ed88a30c99a7a9449aa84174' then amount/1e6
when CONTRACT_ADDRESS='0xc2132d05d31c914a87c6611c10748aeb04b58e8f' then amount/1e6
when CONTRACT_ADDRESS='0x8f3cf7ad23cd3cadbd9735aff958023239c6a063' then amount/1e18
when CONTRACT_ADDRESS='0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270' then amount/1e18
when CONTRACT_ADDRESS='0x7ceb23fd6bc0add59e62ac25578270cff1b9f619' then amount/1e18
when CONTRACT_ADDRESS='0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c' then amount/1e18
else NULL
end as amount_termination,
distinct_users,
countt as count_termination
from tb1
group by 1,2,3,4 having amount_termination is not null
Run a query to Download Data