ArashhUntitled Query
Updated 2023-02-08Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
⌄
/*
with validator as
(select concat('terravaloper',lower(VALIDATOR_ADDRESS_ARRAY[1])) as validator from terra.core.fact_blocks)
select count(*) from terra.core.dim_address_labels
where
ADDRESS in(select validator from validator)
*/
with validator as
(select concat('terra',substr(ADDRESS,13,len(ADDRESS)-17)) as val,ADDRESS from
terra.core.dim_address_labels
where
LABEL_SUBTYPE='validator')
select count(distinct VOTER) from terra.core.fact_governance_votes
where
substr(voter,0,len(VOTER)-5) in (select val from validator)
limit 10
Run a query to Download Data