InternetUnicodeHTMLCSSScalable Vector Graphics (SVG)Extensible Markup Language (xml) ASP.Net TOCASP.NetMiscellaneous Feature ASP.NET Scripting Visual Basic .NET TOC VB ReferenceVB .NET Typographic and Code ConventionsVB .NET Runtime Library MembersVB .NET KeywordsVB.NET AttributesVB .NET Constants and EnumerationsVB .NET Data Type SummaryVB .NET DirectivesVB.NET FunctionsVB.NETModifiersVB .NET ModulesVB .NET NothingVB.NET ObjectsVB.NET OperatorsVB .NET Properties VB .NET QueryVB .NET Aggregate ClauseVB .NET Distinct ClauseVB .NET Equal ClauseVB .NET From Clause Draft for Information Only
ContentGroup By Clause
Group By ClauseGroups the elements of a query result. Can also be used to apply aggregate functions to each group. The grouping operation is based on one or more keys.Syntax
PartsTermDefinition listField1, listField2Optional. 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. keyExp1Required. 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. keyExp2Optional. One or more additional keys that are combined with keyExp1 to create a composite key. aggregateListRequired. One or more expressions that identify how the groups are aggregated. To identify a member name for the grouped results, use the Group keyword, which can be in either of the following forms:
Into Group
-or-
Into <alias> = Group
You can also include aggregate functions to apply to the group.
RemarksYou can use the Group By clause to break the results of a query into groups. The grouping is based on a key or a composite key consisting of multiple keys. Elements that are associated with matching key values are included in the same group. You use the aggregateList parameter of the Into clause and the Group keyword to identify the member name that is used to reference the group. You can also include aggregate functions in the Into clause to compute values for the grouped elements. For a list of standard aggregate functions, see Aggregate Clause.ExampleThe following code example groups a list of customers based on their location (country/region) and provides a count of the customers in each group. The results are ordered by country/region name. The grouped results are ordered by city name.
See also
Source/Reference©sideway ID: 210500013 Last Updated: 5/13/2021 Revision: 0 Ref: ![]() References
![]() Latest Updated Links
![]() ![]() ![]() ![]() ![]() |
![]() Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Travel 18 Reference 79 Computer Hardware 254 Software Application 213 Digitization 37 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 431 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019