Query editor
-- Daily first registrations of Prepunk ENS names in on-chain order.-- query_5191935 includes the 79,720 old-registrar labels whose first-- HashRegistered event precedes CryptoPunks V2 block 3,919,721.-- The cutoff falls within 2017-06-23 UTC, so that final day is partial.WITH daily AS (SELECTCAST("registered date" AS DATE) AS registration_day,count(*) AS daily_registrationsFROM query_5191935GROUP BY 1),calendar AS (SELECT registration_dayFROM (SELECT min(registration_day) AS first_day, max(registration_day) AS last_dayFROM daily) boundsCROSS JOIN UNNEST(sequence(first_day, last_day, INTERVAL '1' DAY))AS dates(registration_day)),timeline AS (SELECTc.registration_day,coalesce(d.daily_registrations, 0) AS daily_registrations,sum(coalesce(d.daily_registrations, 0)) OVER (ORDER BY c.registration_dayROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cumulative_registrationsFROM calendar cLEFT JOIN daily d ON d.registration_day = c.registration_day)SELECTregistration_day,daily_registrations,cumulative_registrations,CASE WHEN registration_day = DATE '2017-06-23'THEN cumulative_registrations END AS cryptopunks_cutoffFROM timelineORDER BY registration_day;