Skip to content

Distinct

relationalai.semantics.frontend.base
Distinct(*items: Value, model: Model)

Represents a “distinct” wrapper for values in a query.

Distinct objects are created by Model.distinct (and the convenience function distinct). Use them either as the only argument to Model.select to remove duplicate rows, or as an argument wrapper for aggregates (for example count(m.distinct(Person.name))) to aggregate over unique values.

Most users should not instantiate this class directly. Prefer Model.distinct. Distinct must be used in the contexts described above; using it elsewhere raises RAIException.

DistinctDSLBase
 semantics
├──  frontend > base
│   └──  Model
│       └──  distinct
└──  distinct