eachCount

fun <E : Any, T : BaseTable<E>, K : Any> EntityGrouping<E, T, K>.eachCount(): Map<K?, Int>(source)

Group elements from the source sequence by key and count elements in each group.

The key for each group is provided by the EntityGrouping.keySelector function, and the generated SQL is like: select key, count(*) from source group by key.

Return

a Map associating the key of each group with the count of elements in the group.