The original query uses a DISTINCT clause. The {0} statement cannot be generated automatically for queries that have a DISTINCT ...