"Enable grouping by a column that is derived from a scalar subselect, or a function that is either not deterministic or has external access" This means that
You can use the CTE for grouping the data using a column that is being derived using a function
example -
WITH CTE (Col1 , col2 , col3 )
as
(Select 1, 1, 1+1
)
SELECT MAX(col1),Max(Col2) FROM CTE
GROUP BY Col3
Regards Keerthi Kiran Hope this answered your question
No comments:
Post a Comment