Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the count of CTE
Message
From
12/10/2021 17:15:59
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Getting the count of CTE
Miscellaneous
Thread ID:
01682503
Message ID:
01682503
Views:
41
I have a CTE query. I have grouped everything in the WITH part. Then, down below, I am adding some calculated fields. Everything works fine. In one of the formula, I need to divide the value by the number of rows in the CTE result. This is where it gets confused.

What would be the best practice to achieve that?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform