Skip to main content

count_grouped

Function count_grouped 

Source
pub fn count_grouped<E: Entity>(
    dialect: Dialect,
    column: &str,
    criteria: &Criteria,
) -> Prepared
Expand description

SELECT column, COUNT(*) AS cnt … GROUP BY column.

One row per distinct value, which is what turns “how many children does each of these parents have” into a single query.