misaghlbOPtimitic or Pessimistic? - sectors
    Updated 2022-10-18
    with allt as (
    SELECT
    BLOCK_TIMESTAMP,
    ifnull(lb.LABEL_TYPE,lb2.LABEL_TYPE) as project,
    tx_hash,
    origin_from_address,
    a.origin_to_address
    FROM arbitrum.core.fact_event_logs a
    LEFT JOIN arbitrum.core.dim_labels lb ON lb.address = a.origin_to_address
    LEFT JOIN flipside_prod_db.crosschain.address_labels lb2 on lb2.address = a.origin_to_address
    WHERE date(block_timestamp) >= '2022-01-01'
    )
    SELECT
    date_trunc('month', BLOCK_TIMESTAMP) as date,
    initcap(project) as project_name,
    COUNT(DISTINCT tx_hash) as tx_count, COUNT(DISTINCT ORIGIN_FROM_ADDRESS) as wallets
    from allt
    GROUP by date, project_name having project_name is not NULL
    ORDER by wallets DESC
    Run a query to Download Data