mamad-5XN3k3New Users (contract interaction)
    Updated 2024-10-11
    with new_usert as (
    select
    distinct origin_from_address,
    min(block_timestamp::date) as FirstTransaction
    from kaia.core.fact_event_logs
    where TX_SUCCEEDED = 'TRUE'
    and block_timestamp::date >= current_date - 30
    group by 1
    ),

    txst as (
    select
    block_timestamp,
    contract_address,
    origin_from_address
    from kaia.core.fact_event_logs
    where TX_SUCCEEDED = 'TRUE'
    and block_timestamp::date >= current_date - 30
    ),

    contractt as (
    select
    ADDRESS,
    PROJECT_NAME,
    LABEL_TYPE as label_types
    from kaia.core.dim_labels

    UNION ALL

    select
    address,
    project_name,
    case
    when label_type ilike '%nft%' then 'nft'
    when label_type ilike '%dex%' then 'dex'
    when label_type ilike '%token%' then 'token'
    QueryRunArchived: QueryRun has been archived