jackguyArbitrum 5
    Updated 2022-11-18
    with defi_contracts as (
    SELECT
    project_name,
    address
    FROM arbitrum.core.dim_labels
    WHERE label_type LIKE 'defi'
    )

    SELECT
    date_trunc('day', block_timestamp) as day,
    count(DISTINCT tx_hash),
    count(DISTINCT ORIGIN_FROM_ADDRESS)
    -- count(DISTINCT ORIGIN_FROM_ADDRESS),
    -- count(DISTINCT tx_hash)
    FROM arbitrum.core.fact_event_logs
    LEFT outer JOIN defi_contracts
    ON address = contract_address
    GROUP BY 1

    Run a query to Download Data