|
|
This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (November 2009) |
In computer science, an aggregate function is a function that returns a single value from a collection of input values such as a set, a bag or a list.
Common aggregate functions include:
Aggregate functions are common in numerous programming languages such as Ruby, in spreadsheets, and in relational algebra.
Contents |
SQL Aggregate Functions
SQL aggregate functions return a single value, calculated from values in a column.
Useful aggregate functions:
* AVG() - Returns the average value * COUNT() - Returns the number of rows * FIRST() - Returns the first value * LAST() - Returns the last value * MAX() - Returns the largest value * MIN() - Returns the smallest value * SUM() - Returns the sum
SQL Scalar functions
|
|
This section may stray from the topic of the article. Please help improve this section or discuss this issue on the talk page. |
SQL scalar functions return a single value, based on the input value.
Useful scalar functions:
* UCASE() - Converts a field to upper case * LCASE() - Converts a field to lower case * MID() - Extract characters from a text field * LEN() - Returns the length of a text field * ROUND() - Rounds a numeric field to the number of decimals specified * NOW() - Returns the current system date and time * FORMAT() - Formats how a field is to be displayed
See also
- Group by (SQL), SQL implementation
References
| This computer language-related article is a stub. You can help Wikipedia by expanding it. |
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)




