I am having trouble generating subquery using "WITH" clause with "plain SQL Query". Use case is that I have an SQL and I just want to use it as a with subquery and create a query on top of that.
Example:
Query I have:
"SELECT a,b,c FROM T"
I want to create:
WITH "t1" as ( SELECT a,b,c FROM T )
SELECT a,b FROM "t1";
I am trying to use DSL.with(...) but it only takes SelectStep or CTE. I also noticed that we can't create CTE using plain SQL. Please help with this if there is any way to achieve this. Thanks in advance.