kakamoraNumber of transactions done by ENS Users
    Updated 2022-01-06
    WITH ens_reg_txns AS (
    SELECT
    block_timestamp,
    tx_id,
    event_inputs:cost:: number / 1e18 as ens_cost,
    event_inputs:name::string as ens_name,
    event_inputs:owner as owner,
    LEN(ens_name) as ens_domain_length,
    case
    when ens_domain_length <= 3 then 'Premium Domain (1-3 Charaters)'
    when ens_domain_length = 4 then 'Premium Domain (4 Charaters)'
    else 'Regular Domain'
    end as domain_category,
    row_number()over(partition by ens_name order by block_timestamp) as rank
    FROM ethereum.events_emitted
    WHERE event_name = 'NameRegistered'
    and TX_TO_ADDRESS = '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5'
    and ens_cost > 0
    and event_removed = false
    and block_timestamp >= CURRENT_DATE - 180
    QUALIFY rank = 1
    ),
    from_owner_trxns as (
    select
    txns.tx_id,
    txns.block_timestamp,
    txns.from_address as owner
    from ethereum.transactions txns
    INNER JOIN ens_reg_txns ens ON txns.from_address = ens.owner
    and txns.block_timestamp >= CURRENT_DATE - 180
    and success = true
    ),
    to_owner_trxns as (
    select
    txns.tx_id,
    txns.block_timestamp,
    Run a query to Download Data