elsinaDistribution of Domains Price
    Updated 2025-05-20
    with price as (
    select
    date_trunc('day', hour) as date,
    avg(price) as price_usd
    from crosschain.price.ez_prices_hourly
    where
    blockchain = 'ethereum' and
    token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    group by 1
    ),
    base as (
    SELECT
    e.block_timestamp,
    e.origin_from_address,
    e.tx_hash,
    value as amount,
    amount * price_usd as amount_usd,
    tx_fee,
    utils.udf_hex_to_string(substring(data, 129)) AS domain_name
    from ink.core.fact_event_logs e left join ink.core.fact_transactions t on e.tx_hash = t.tx_hash left join price on e.block_timestamp::date = date
    where
    e.tx_succeeded = TRUE and
    topics[0] = '0x53946bf984072f5888fcb2d7d2b0587c8efeb9187d958f21809711cf00b4b4a5' and
    origin_to_address = '0xfb2cd41a8aec89efbb19575c6c48d872ce97a0a5'
    )

    select
    case
    when amount_usd < 1 then 'A. less than $1'
    when amount_usd < 5 then 'B. $1 - $5'
    when amount_usd < 10 then 'C. $5 - $10'
    else 'D. More than $10' end as dis,
    count(distinct tx_hash) as tx_count,
    100.0 * count(distinct tx_hash) / sum(count(distinct tx_hash)) over () as user_count_percentage
    from base
    Last run: 29 days ago
    DIS
    TX_COUNT
    USER_COUNT_PERCENTAGE
    1
    A. less than $17691.805122
    2
    B. $1 - $53584884.148259
    3
    C. $5 - $10581813.656956
    4
    D. More than $101660.389662
    4
    130B
    4s