It helps break down complicated and large queries into simpler, easily readable forms and proves especially useful when the subquery is executed multiple times. It computes the aggregation once and can then be repeatedly referenced by its name in the queries. CTEs can reference each other and can be nested. TheDocumentation Index
Fetch the complete documentation index at: https://docs.risingwave.com/llms.txt
Use this file to discover all available pages before exploring further.
WITH clause must be defined before it’s used in the query.
Here is the basic syntax of a SELECT statement with the optional WITH clause: