rajsUntitled Query
Updated 2023-01-04Copy Reference Fork
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 req_tab as
(
SELECT
delegator_address,
validator_address,
sum(amount) / 1e6 as amount_million
from terra.core.ez_staking
where action = 'Delegate'
group by 1,2
UNION ALL
SELECT
delegator_address,
validator_address,
-sum(amount) / 1e6 as amount_million
from terra.core.ez_staking
where action = 'Undelegate'
group by 1,2
UNION ALL
SELECT
delegator_address,
validator_src_address as validator_address,
-sum(amount) / 1e6 as amount_million
from terra.core.ez_staking
where action = 'Redelegate'
group by 1,2
UNION ALL
SELECT
delegator_address,
validator_address,
sum(amount) / 1e6 as amount_million
Run a query to Download Data