This section describes the types of oracle grouping functions.

Source: Internet
Author: User

Oracle grouping function is a familiar function. The following describes several types of oracle grouping function for your reference. I hope it will help you learn about oracle grouping function.

1. the Oracle server calculates the substatement value in the following order:
1. If the statement contains a WHERE clause, the server creates a candidate row.
2. The server determines the GROUP specified in the group by clause.
3. The HAVING clause further restricts result groups that do not meet the grouping criteria in the HAVING clause.

Ii. oracle grouping function types:
• AVG average • COUNT • MAX maximum • MIN minimum • STDDEV standard deviation • SUM total • VARIANCE
1. All oracle grouping functions ignore null values. To replace null values with a single value, use the NVL, NVL2, or COALESCE function.
2. DISTINCT allows the function to only consider non-repeated values; ALL allows the function to consider each value, including repeated values. The default value is ALL, so no

This parameter must be specified.
3. The data type of parameters used for functions can be CHAR, VARCHAR2, NUMBER, or DATE.
4. When the group by clause is used, the Oracle server implicitly sorts the result set in ascending order. To overwrite the default order, DESC can be used

In the order by clause.
Usage type: MIN and MAX can be used for any data type. AVG, SUM, VARIANCE, and STDDEV functions can only be used for numbers.

Data type.
COUNT Function
The COUNT function has three formats:
COUNT (*) returns the standard row of the select statement, including duplicate rows and null columns.
COUNT (expr) is the number of non-null values specified by expr.
COUNT (DISTINCT expr) returns the number of unique non-null values specified by expr in the column.
Use the NVL function in the oracle grouping function:
NVL functions force group functions to contain null values
 

Oracle Pipeline Function usage

Use of oracle custom functions

Oracle TRIM function syntax

Oracle date functions

Syntax for creating an Oracle package

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.