From 74b38d30f43f7005428e09fa80508c5f21324c99 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baumann@progress-linux.org>
Date: Mon, 10 Oct 2022 13:29:00 +0200
Subject: Adding upstream version 6.3.1.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
---
 tests/fixtures/optimizer/tpc-h/tpc-h.sql | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

(limited to 'tests/fixtures/optimizer/tpc-h/tpc-h.sql')

diff --git a/tests/fixtures/optimizer/tpc-h/tpc-h.sql b/tests/fixtures/optimizer/tpc-h/tpc-h.sql
index d2f10fc..936a0af 100644
--- a/tests/fixtures/optimizer/tpc-h/tpc-h.sql
+++ b/tests/fixtures/optimizer/tpc-h/tpc-h.sql
@@ -769,13 +769,20 @@ group by
 order by
         custdist desc,
         c_count desc;
-WITH "c_orders" AS (
+WITH "orders_2" AS (
+  SELECT
+    "orders"."o_orderkey" AS "o_orderkey",
+    "orders"."o_custkey" AS "o_custkey",
+    "orders"."o_comment" AS "o_comment"
+  FROM "orders" AS "orders"
+  WHERE
+    NOT "orders"."o_comment" LIKE '%special%requests%'
+), "c_orders" AS (
   SELECT
     COUNT("orders"."o_orderkey") AS "c_count"
   FROM "customer" AS "customer"
-  LEFT JOIN "orders" AS "orders"
+  LEFT JOIN "orders_2" AS "orders"
     ON "customer"."c_custkey" = "orders"."o_custkey"
-    AND NOT "orders"."o_comment" LIKE '%special%requests%'
   GROUP BY
     "customer"."c_custkey"
 )
-- 
cgit v1.2.3

