ArashhUntitled Query
    Updated 2023-02-08
    /*
    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