cloudr3nxSGD Deposit/Withdrawal
Updated 2024-03-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
›
⌄
-- withdrawal address 0x446ed7a8f70011db648451c668317e9c7390a7d8
with
polygon as (
select
date(block_timestamp) as day,
case when from_address='0x446ed7a8f70011db648451c668317e9c7390a7d8' then 'Withdrawal'
when to_address='0x446ed7a8f70011db648451c668317e9c7390a7d8' then 'Deposit'
end as transaction_type,
sum(amount) as total_amount,
'polygon' as chain
from
polygon.core.ez_token_transfers
where
contract_address in (
'0xdc3326e71d45186f113a2f448984ca0e8d201995'
)
and (from_address='0x446ed7a8f70011db648451c668317e9c7390a7d8' or to_address='0x446ed7a8f70011db648451c668317e9c7390a7d8')
group by
day,
transaction_type
order by
day desc
),
ethereum as (
select
date(block_timestamp) as day,
case when from_address='0x446ed7a8f70011db648451c668317e9c7390a7d8' then 'Withdrawal'
when to_address='0x446ed7a8f70011db648451c668317e9c7390a7d8' then 'Deposit'
end as transaction_type,
sum(amount) as total_amount,
'ethereum' as chain
from
ethereum.core.ez_token_transfers
where
contract_address in (
QueryRunArchived: QueryRun has been archived