                 let request = T.all()
                     .with(cte)
                 try assertEqualSQL(db, request, """
-                WITH "t" AS (SELECT 'O''Brien') \
-                SELECT "t1".* FROM "t" "t1"
-                """)
+                    WITH "t" AS (SELECT 'O''Brien') \
+                    SELECT "t1".* FROM "t" "t1"
+                    """)
             }
-
+            
             // Just add a WITH clause: custom name for the CTE
             do {
                 let cte = T.all()

                    .with(cte)
                    .joining(required: cte, on: { (left, right) in left["id"] > right["id"] })
                    .joining(required: cte, on: { (left, right) in left["id"] + right["id"] == 1 })
               try assertEqualSQL(db, request, """
                WITH "t2" AS (SELECT * FROM "t") \
                SELECT "t1".* \
                FROM "t" "t1" \
                JOIN "t2" ON "t1"."id" > "t2"."id"
                """)
            }
            
            // Join two CTEs with different keys

                    .with(cte)
                    .joining(required: cte.forKey("a"), on: { (left, right) in left["id"] > right["id"] })
                    .joining(required: cte.forKey("b"), on: { (left, right) in left["id"] > right["id"] })
                try assertEqualSQL(db, request, """
                    WITH "t2" AS (SELECT * FROM "t") \
                    SELECT "t1".* \
                    FROM "t" "t1" \
                    JOIN "t2" ON "t1"."id" > "t2"."id"
                    """)
            }
            
//            // Use CTE as a subquery
//            do {
//                let cte = T.all()
//                    .commonTableExpression()
//                let request = T.all()
//                    .with(cte)
//                    .annotated(with: cte.all())
//                try assertEqualSQL(db, request, """
//                    WITH "foo" AS (SELECT * FROM "t") \
//                    SELECT "t".*, (SELECT * FROM "foo") FROM "t"
//                    """)
//            }
        }
    }
}
