anchor.diff:      FROM Cat kitten
       ORDER BY kitten.age DESC, kitten.id DESC
       LIMIT 5
  -) topKitten(age, father.id, id, mother.id, name)
  +) topKitten(age, father.id, id, mother.id, name) ON 1=1
   GROUP BY c.name
   ----
   
   Note that lateral joins only work for inner and left joins. Also, not all databases support lateral joins.
  -H2 and HSQL do not support that feature. MySQL only supports this since version 8. Oracle supports this since version 12.+H2 and HSQL do not support that feature. MySQL only supports this since version 8. Oracle supports this since version 12.
  
positive.code:         .orderByDesc("id")
          .setMaxResults(5)
      .end()
      .select("c.name")
      .select("COUNT(topKitten.id)");
  ----
  
negative.code: The example query shows a special feature of lateral joins, which is the possibility to correlate a collection for a lateral join.
  This could also have been written by correlating an entity type and defining the correlation for the collection in the `WHERE` clause manually.
  
  The resulting JPQL might look like the following:
  
  [source,sql]
  ----
  