MLDZMNTop domain creators on AllDomains
    Updated 2023-08-15
    with t1 as (select
    RECORDED_HOUR::date as day,
    SYMBOL,
    avg(close) as price_token
    from solana.core.fact_token_prices_hourly
    where SYMBOL in ('SOL','BONK')
    group by 1,2),


    tb3 AS (select
    signers[0] as user,
    block_timestamp,
    tx_id,
    case
    when l.value ilike '%.poor%' then '.poor'
    when l.value ilike '%.moon%' then '.moon'
    when l.value ilike '%.abc%' then '.abc'
    when l.value ilike '%.bonk%' then '.bonk'
    end as TLDs,
    case when TLDs = 'bonk' then 'BONK' else 'SOL' end as symbol,
    case when TLDs = 'bonk' then 69000000 else transfer.amount end as fee

    from solana.core.fact_transactions s
    join (select tx_id
    from solana.core.fact_events where succeeded = True
    and program_id = 'TLDHkysf5pCnKsVA4gXpNvmy7psXLPEu4LAdDJthT9S')
    using(tx_id)
    join lateral flatten (input => log_messages) l
    left join (select *
    from solana.core.fact_transfers where mint='So11111111111111111111111111111111111111112'
    ) transfer
    using(tx_id, block_timestamp)

    where BLOCK_TIMESTAMP>='2022-10-21'
    and (l.value ilike 'Program log: Creating new domain%' --.bonk and .poor has no extend option and cretaed once
    or l.value ilike 'Program log: Buying or extending renewable domain%' --.abc and .moon has extend option
    Run a query to Download Data