par_rnUSDC balance
Updated 2022-12-02Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
with Ban As (select BLOCK_TIMESTAMP,EVENT_INPUTS:target AS "banned address" from ethereum.core.fact_event_logs
where EVENT_NAME='Blacklisted' and ORIGIN_FROM_ADDRESS='0x5db0115f3b72d19cea34dd697cf412ff86dc7e1b'
and EVENT_INPUTS:target not in (select EVENT_INPUTS:_account from ethereum.core.fact_event_logs
where EVENT_NAME='UnBlacklisted' and ORIGIN_FROM_ADDRESS='0x5db0115f3b72d19cea34dd697cf412ff86dc7e1b')),
tb AS (select USER_ADDRESS,LAST_ACTIVITY_BLOCK_TIMESTAMP,CURRENT_BAL,SYMBOL,USD_VALUE_NOW
from ethereum.core.ez_current_balances where USER_ADDRESS in (select "banned address" from ban) and SYMBOL is not NULL and USD_VALUE_NOW is not NULL)
select
case when ADDRESS_NAME is not null then ADDRESS_NAME
else USER_ADDRESS end AS "banned address",
sum(case when SYMBOL='USDC' then CURRENT_BAL else 0 end) AS "USDC balance"
from tb left join ethereum.core.dim_labels on address=USER_ADDRESS
group by 1 having ("USDC balance">0)
order by 2 desc
limit 10
Run a query to Download Data