snuyanzin commented on code in PR #24256:
URL: https://github.com/apache/flink/pull/24256#discussion_r1853310710


##########
docs/content/docs/dev/table/concepts/versioned_tables.md:
##########
@@ -163,13 +163,10 @@ table usable in subsequent queries.
 In general, the results of a query with the following format produces a 
versioned table:
 
 ```sql
-SELECT [column_list]
-FROM (
-   SELECT [column_list],
-     ROW_NUMBER() OVER ([PARTITION BY col1[, col2...]]
-       ORDER BY time_attr DESC) AS rownum
-   FROM table_name)
-WHERE rownum = 1
+SELECT [column_list],
+    ROW_NUMBER() OVER ([PARTITION BY col1[, col2...]] ORDER BY time_attr 
[asc|desc]) AS rownum
+FROM table_name)
+QUALIFY rownum = 1

Review Comment:
   replaced with
   ```sql
   SELECT [column_list]
   FROM table_name
   QUALIFY ROW_NUMBER() OVER ([PARTITION BY col1[, col2...]] ORDER BY time_attr 
[asc|desc]) = 1
   ```



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to