intellidegentEthereum New Addresses
    Updated 2023-03-06
    WITH ethereumToAddress as (
    SELECT
    'toAddress' as AddressType,
    TO_ADDRESS,
    MIN(DATE_TRUNC('MONTH',BLOCK_TIMESTAMP)) as Month
    FROM ethereum.core.fact_transactions
    WHERE date_trunc('month',block_timestamp) >= '2021-01-01'
    AND date_trunc('month',block_timestamp) < '2023-03-01'
    GROUP BY TO_ADDRESS),
    ethereumToAddressCount as (
    SELECT
    'Ethereum' as Blockchain,
    Month,
    COUNT(TO_ADDRESS) as NewAddress,
    lag(NewAddress,1,0) OVER (PARTITION BY Blockchain ORDER BY Month) as PrevMonth
    FROM ethereumToAddress
    GROUP BY Month)
    SELECT *,
    DIV0((NewAddress -PrevMonth),PrevMonth) * 100 as PercentChange
    FROM ethereumToAddressCount
    Run a query to Download Data