Oracle Clustering functions

Source: Internet
Author: User
Tags commit numeric min numeric value

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20-21 AVG ([distinct|all]x) feature statistic datasheet selects the average of row x columns.   The parameters all mean that all values are averaged, distinct only averages for different values, and the default is all if there are arguments distinct or all, spaces are separated from X (columns). Parameter x, you can only return a numeric value sample environment for a numeric field: Create TABLE Table3 (XM varchar (8), Sal number (7,2)); INSERT into table3 values (' Gao ', 1111.11); INSERT into table3 values (' Gao ', 1111.11); INSERT into table3 values (' Zhu ', 5555.55);   Commit Executive Statistics: SELECT AVG (DISTINCT sal), AVG (all Sal), AVG (SAL) from Table3; Results: 3333.33 2592.59 2592.59

?

1 The sum ([distinct|all]x) feature statistic datasheet selects the total value of row x columns. The "parameters" all represents the total value of all values, distinct only the aggregate value for different values, the default is all if there is a parameter distinct or all, you need to have a space separated from the X (column). Parameter x, you can only return a numeric value sample environment for a numeric field: Create TABLE Table3 (XM varchar (8), Sal number (7,2)); INSERT into table3 values (' Gao ', 1111.11); INSERT into table3 values (' Gao ', 1111.11); INSERT into table3 values (' Zhu ', 5555.55); Commit Executive statistics: Select SUM (distinct sal), sum (all Sal), sum (SAL) from Table3; Results: 6666.66 7777.77 7777.77

?

1 The variance ([distinct|all]x) feature statistic datasheet selects the variance of row x columns. The "arguments" all represents variance for all values, distinct only for different values, and the default is all if there is a parameter distinct or all, a space is separated from the X (column). Parameter x, you can only return a numeric value sample environment for a numeric field: Create TABLE Table3 (XM varchar (8), Sal number (7,2)); INSERT into table3 values (' Gao ', 1111.11); INSERT into table3 values (' Gao ', 1111.11); INSERT into table3 values (' Zhu ', 5555.55); Commit Executive Statistics: Select variance (Distinct sal), variance (all Sal), variance (SAL) from Table3; Results: 9876523.4568 6584348.9712 6584348.9712

?

1 Count (*|[ DISTINCT|ALL]X) The "feature" Statistics table selects the total value of row x columns. The "parameter" * represents all the row statistics that meet the criteria, regardless of whether it repeats or has null value (NULL) all represents a statistic for all values, the default is all distinct only for different values, and if there are parameters distinct or all, spaces are separated from X (columns) and null values are ignored ( NULL). "Parameter" x, can be a number, character, date, and other type of field "return" Numeric value count (*) =sum (1) "Sample" Environment: Create TABLE Table3 (XM varchar (8), Sal (7,2)); INSERT into table3 values (' Gao ', 1111.11); INSERT into table3 values (' Gao ', 1111.11); INSERT into table3 values (' Zhu ', 5555.55); INSERT into table3 values (', 1111.11); INSERT into table3 values (' Zhu ', 0); Commit Execution Statistics: SELECT COUNT (*), COUNT (XM), COUNT (all XM), COUNT (distinct Sal), COUNT (all Sal), Count (Sal), SUM (1) from Table3; Results: 5 4 4 3 5 5 5

?

1
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.