adambalamatic
Updated 2022-09-22
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
stake as (
select
count (distinct tx_hash) txs,
count (distinct ORIGIN_FROM_ADDRESS) user,
sum (amount) MATIC,
avg (amount) AVG_MATIC,
sum (amount_usd) USD,
'STAKE' AS TITLE
from ethereum.core.ez_token_transfers
where to_address = lower('0x5e3ef299fddf15eaa0432e6e66473ace8c13d908')
and ORIGIN_FUNCTION_SIGNATURE='0x6ab15071'
and MONTHNAME(block_timestamp) >'JULY'
AND DATE(block_timestamp) >'2022-01-01'
group by TITLE
),
unstake as (
select
count (distinct tx_hash) txs,
count (distinct ORIGIN_FROM_ADDRESS) user,
sum (amount) MATIC,
avg (amount) AVG_MATIC,
sum (amount_usd) USD,
'UNSTAKED' AS TITLE
from ethereum.core.ez_token_transfers
where FROM_address = lower('0x5e3ef299fddf15eaa0432e6e66473ace8c13d908')
and ORIGIN_FUNCTION_SIGNATURE='0x8d16a14a'
and MONTHNAME(block_timestamp) >'JULY' AND DATE(block_timestamp) >'2022-01-01'
group by TITLE
)
select
txs,
user,
MATIC,
Run a query to Download Data