maropu commented on a change in pull request #28196: [SPARK-31428][SQL][DOCS]
Document Common Table Expression in SQL Reference
URL: https://github.com/apache/spark/pull/28196#discussion_r407277312
##########
File path: docs/sql-ref-syntax-qry-select-cte.md
##########
@@ -19,4 +19,120 @@ license: |
limitations under the License.
---
-**This page is under construction**
+### Description
+
+A common table expression (CTE) defines a temporary result set that a user can
reference within the duration of a SQL statement. A CTE can be used wherever a
SELECT statement is used; for example, it can be used in a SELECT, INSERT,
UPDATE, DELETE, MERGE or CREATE VIEW statement. A CTE has a name with an
optional column names list, followed by a query expression. When a CTE
references itself, it is called a recursive CTE.
+
+### Syntax
+
+{% highlight sql %}
+WITH common_table_expression [ , ... ]
+{% endhighlight %}
+
+While ```common_table_expression``` is defined as
Review comment:
a single backquote?
https://github.com/apache/spark/blame/master/docs/sql-ref-syntax-qry-select.md#L38
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]