``` Production .innerJoin(O...
# exposed
d
Copy code
Production
                .innerJoin(Organization, { Organization.organizationId }, { Production.organizationId })
                .innerJoin(Performance, { Production.productionId }, { Performance.productionId })
                .slice(Production.name, Performance.date)
                .select { Organization.id eq organizationId }
                .orderBy(Performance.date)
                .distinct()
                .forEach {
                    println("${it[Production.name]}")
                }
t
I was using something like this to get distinct
Copy code
MyTable
  .slice(MyTable.myColumn.countDistinct())
  .select {
    MyTable.myOtherColumn.eq(true)
  }.first()
  .let {
    it[MyTable.myColumn.countDistinct()]
  }