Skip to content

Commit d676af9

Browse files
committed
Added test for query on hierarchical CTE tables.
1 parent d35a20d commit d676af9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
WITH _t0 AS
2+
(
3+
SELECT
4+
_t0.*
5+
FROM [dbo].[Categories] AS _t0
6+
),
7+
_t1 AS
8+
(
9+
SELECT
10+
_t1.*
11+
FROM [dbo].[Products] AS _t1
12+
INNER JOIN _t0 ON (_t1.[CategoryID] = _t0.[CategoryID])
13+
WHERE (_t1.[SupplierID] IS NOT NULL)
14+
)
15+
16+
SELECT
17+
_t2.*
18+
FROM [dbo].[Suppliers] AS _t2
19+
INNER JOIN _t1 ON (_t2.[SupplierID] = _t1.[SupplierID])

0 commit comments

Comments
 (0)