13_Aggregation.pdf - CITS1402 Relational Database...

This preview shows page 1 - 5 out of 14 pages.

CITS1402 Relational Database Management Systems Video 13 — Summary Functions Gordon Royle Department of Mathematics & Statistics
Summarising Data One of the main uses of a database is to summarize the data it contains, in particular to provide statistical data . The main summary / aggregate functions are I COUNT – to count rows I SUM – to add up the values in a column I MIN – to find the minimum value in a column I MAX – to find the maximum value in a column I AVG – to find the average value in a column I STD – to find the standard deviation of the values in a column
The key point The critical point to remember is the following: When using a summary / aggregate function, a group of rows is replaced by a single row containing “summary” information about that group. In the simplest case, the group of rows is just the entire table.
Warning To make sense of an aggregate, each column should be either I An aggregate function, or I A column whose value is constant on each group of rows.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture