Pine AnalyticsINK 12
Updated 2025-03-06
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 tab1 as (
select
block_timestamp,
tx_hash,
to_address as wallet,
'in' as tx_type,
amount
from ink.core.ez_token_transfers
where contract_address like lower('0xF1815bd50389c46847f0Bda824eC8da914045D14')
--and to_address like '0x0000000000000000000000000000000000000000'
union all
select
block_timestamp,
tx_hash,
from_address as wallet,
'out' as tx_type,
amount
from ink.core.ez_token_transfers
where contract_address like lower('0xF1815bd50389c46847f0Bda824eC8da914045D14')
--and like '0x0000000000000000000000000000000000000000'
)
select
wallet,
sum(
case when tx_type like 'in' then amount else -amount end
) as balance
from tab1
group by 1
order by 2 desc
QueryRunArchived: QueryRun has been archived