Skip to content

Instance Method

distinct(on:)

Adds a DISTINCT clause to the select statement and explicitly specifies columns to select, overwriting any previously specified columns.
@discardableResult func distinct(on columns: [any SQLExpression]) -> Self

Discussion

Warning

This does NOT invoke PostgreSQL’s DISTINCT ON (...) syntax!