Skip to main content

Aggregate Functions in SQL SERVER

Aggregate Functions

These functions perform an operation on a set of fields and return a single value. Their use is relatively limited. They can be used in the following situations:

  • The selection list of the SELECT statement
  • A HAVING clause
  • A COMPUTE clause
Function                                                                                     Description

AVG ([ALL| DISTINCT] expression)Returns the average value in the group.
COUNT( [ALL|DISTINCT] expression) Counts the number of items in the group.
COUNT_BIG( [ ALL|DISTINCT] expression) Counts the number of items in the group. the result is returned in the form of bigint number.
GROUPING(Column_Name)Creates an additional column with a value of 1 operator or 0 if it is not the result of a CUBE or ROLLUP operator.
MAX( expression) Returns the maximum value in the expression.
MIN( expression)Returns the minimum value in the expression.
SUM ( expression)returns the sum of the expression's value.
STDEV (expression)Returns the statistical standard deviation for the values in the expression.
VAR (expression) Returns the statistical variance of the values in the expression.

Comments

Popular posts from this blog

Advantages of E-Commerce

Electronic Commerce increases Profits : Electronic commerce increases sales and decrease costs. Advertising on the web reaches all the users of that website. A firm can use the web to reach communities which are scattered geographically. The web's natural advantage is that it is low cost medium for disseminating information and processing transaction. for e.g the cost of advertising on the web is much less as compared to advertising in a newspaper. Another benefit of web based commerce is that information based industries excel here. A virtual organisation increases efficiency through the automation of processes. The cost of handling sales inquiries and determining product availability can be reduced with the help of e-commerce in the marketing process of the business. E-commerce increases the speed and accuracy with which businesses can exchange information which reduces costs on both sides of transactions. Another Advantage of e-commerce is ...

Unified Modeling Language- (UML)

Brief Background UML is a language for specifying,visualizing ,documenting and constructing the artifacts of software systems,as well as for business modeling and other non-software systems. UML has been developed by Grady  Booch, James Rumbaugh and Ivar Jacobson. Goals of UML are : To model systems using Object oriented concepts. To establish an explicit coupling to conceptual as well as executable artifacts To address the issues of scale inherent in complex , mission critical systems. To create a modeling language that can be used by humans as well as machines.  Understanding the thirteen diagrams of UML 2.x is an important part of understanding OO development. Although there is  far more to modeling than just the UML  the reality is the UML defines the standard modeling artifacts when it comes to object technology. There are three classifications of UML diagrams: Behavior diagrams . A type of diagram that depicts behavioral features of a ...

Softwares available for Web Development

 HTML HTML is one of the fundamental technologies that the Web is built upon. HTML elements form the building blocks of all websites. HTML allows images and objects to be embedded and can be used to create interactive forms. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It can embed scripts written in languages such as JavaScript which affect the behavior of HTML web pages. These features will help developers and businesses better engage with their customers.  JavaScript JavaScript is a part of the fabric of the Web. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles. Its an interpreted computer programming language and allows client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed. It has also become comm...