Manipulating Data: Statistics

  1. Manipulating Data
  2. Update Data

There are several statistical functions available. Some of the simplest are max(), min(), avg(), and count(), for the maximum value, minimum value, average value, and number of values in a set of records.

For example, if we want to find out the most recent purchase date, we can use:

select max(purchasedate) from albums

On March 31, 2005, we purchased something. Now, what is the earliest album we bought?

select min(purchasedate) from albums

The earliest purchase date is “0000-00-00”. Even if we’re really into the oldies that seems an awfully long time ago.

  1. Manipulating Data
  2. Update Data