prorm API Reference
    Preparing search index...

    Interface ScalarSubqueryOptions

    Scalar subquery options (returns single value)

    interface ScalarSubqueryOptions {
        model: string | { tableName?: string; name?: string };
        column: string;
        aggregate?: "SUM" | "AVG" | "COUNT" | "MAX" | "MIN";
        where?: Record<string, any>;
    }
    Index
    model: string | { tableName?: string; name?: string }

    Model or table name for the subquery

    column: string

    Column to aggregate

    aggregate?: "SUM" | "AVG" | "COUNT" | "MAX" | "MIN"

    Aggregate function

    where?: Record<string, any>

    Where conditions