3 ms·
"I'm really not sure what motivated the author to create the CTE in the first place, as the final select seems to be essentially the identity function." We're
by Normal_gaussian 1y ago
"I'm really not sure what motivated the author to create the CTE in the first place, as the final select seems to be essentially the identity function."
We're likely seeing a simplified example. All queries should be able to be embedded in a CTE without integrity loss.
- zokier 1y agoI think CTE is red herring here, the problem is in the sub-query regardless if it's in CTE or not
- Normal_gaussian 1y agoYes, it is a red herring for sure; using a limit without a sort in a sub-query is always an issue.