larrypenguinContracts Eth %
    Updated 2023-04-17
    with total AS (
    SELECT
    trunc(BLOCK_TIMESTAMP, 'month') as time,
    COUNT(DISTINCT TX_HASH) as transactions
    FROM
    ethereum.core.fact_event_logs
    GROUP BY
    time
    ORDER BY
    time DESC),


    ethInfo AS (
    SELECT
    *
    FROM (
    SELECT
    trunc(BLOCK_TIMESTAMP, 'month') as time,
    COUNT(DISTINCT TX_HASH) as transactions,
    row_number() OVER (PARTITION BY time ORDER BY transactions DESC) as contract_rank,
    CONTRACT_ADDRESS,
    CONTRACT_NAME
    FROM
    ethereum.core.fact_event_logs
    GROUP BY
    CONTRACT_ADDRESS,
    CONTRACT_NAME,
    time
    ORDER BY
    time DESC)
    WHERE
    contract_rank <= 1
    )

    SELECT total.time,
    total.transactions AS total_transactions
    Run a query to Download Data