Skip to content

Commit 10c6ddd

Browse files
CopilotBillWagner
andauthored
Document Group By alias syntax for grouping keys in Visual Basic (#48176)
* Initial plan * Document Group By alias syntax for grouping keys Co-authored-by: BillWagner <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: BillWagner <[email protected]>
1 parent a24cc9a commit 10c6ddd

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

docs/visual-basic/language-reference/queries/group-by-clause.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,31 @@ Groups the elements of a query result. Can also be used to apply aggregate funct
2424
Group [ listField1 [, listField2 [...] ] By keyExp1 [, keyExp2 [...] ]
2525
Into aggregateList
2626
```
27+
28+
-or-
29+
30+
```vb
31+
Group [ listField1 [, listField2 [...] ] By alias1 = keyExp1 [, alias2 = keyExp2 [...] ]
32+
Into aggregateList
33+
```
2734

2835
## Parts
2936

3037
- `listField1`, `listField2`
3138

3239
Optional. One or more fields of the query variable or variables that explicitly identify the fields to be included in the grouped result. If no fields are specified, all fields of the query variable or variables are included in the grouped result.
3340

41+
- `alias1`, `alias2`
42+
43+
Optional. Names that are assigned to the grouping keys. If aliases are provided, they can be referenced in the query result instead of the key expressions.
44+
3445
- `keyExp1`
35-
46+
3647
Required. An expression that identifies the key to use to determine the groups of elements. You can specify more than one key to specify a composite key.
37-
48+
3849
- `keyExp2`
39-
40-
Optional. One or more additional keys that are combined with `keyExp1` to create a composite key.
50+
51+
Optional. One or more additional keys that are combined with `keyExp1` to create a composite key.
4152

4253
- `aggregateList`
4354

0 commit comments

Comments
 (0)