I want to know the best way to use the cte in this context where in I have 2 identical queries except for 2 different filter conditions .So below is how the definition of the cte with 2 different queries looks like at the moment .I will be using this two datasets separately in processing data .
with cte1
AS
(
select from table where a>1
)
with cte2
(
select from table where b>1
)
Is my declaration and definition right in this context or should it be
with cte1
as
(
select from table where a>1
)
,
cte2
as
(
select from table where b>1