I've also tried something like .distinctBy { Produ...
# exposed
d
I've also tried something like .distinctBy { Production } but here only one row is returned.
t
distincBy is a function provided by
kotlin.Collection
, not
exposed
. You tried what I answer you before?
d
Still trying to wrap my head around it
t
How would you write it using raw SQL?
d
Hmm, I was not able to figure out an appropriate SQL statement
But your hit about collections helped a lot, thanks.
Just for the records I'm using now:
Copy code
...
.orderBy(Performance.date)
.map { it[Production.name] }
.distinct()
.forEach {
  println(it)
}