dariustay_0512[OLD] Daily unique contracts deployed / deployers
    Updated 2023-04-13
    WITH contracts AS (
    SELECT
    address,
    address_name,
    label_type,
    label_subtype,
    project_name
    FROM avalanche.core.dim_labels
    WHERE label_subtype LIKE '%contract' -- filter for general_contract, token_contract and swap_contract
    ),

    deployers AS (
    SELECT
    address,
    address_name,
    label_type,
    label_subtype,
    project_name
    FROM avalanche.core.dim_labels
    WHERE label_subtype LIKE 'contract%' -- filter for contract_deployer
    ),


    tx_daily AS (
    SELECT
    date(block_timestamp) AS date,
    contract_address AS contract
    FROM avalanche.core.fact_event_logs
    WHERE tx_status = 'SUCCESS'
    ),

    volume_contracts AS (
    SELECT
    t.date AS date,
    COUNT(DISTINCT t.contract) AS contract
    FROM tx_daily t
    Run a query to Download Data