Itec350Group_Chapter6_PowerpointPresentation2

Itec350Group_Chapter6_PowerpointPresentation2 - Chapter 6...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style 10/19/10 Chapter 6 Summarizing & Grouping Data Gustavo Tovar-Banda, Gabriel Wright, Elisa Gutierrez,   Holly Jordan, Katie Hamilton, Fernando Chiossoni
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/19/10 Introduction of Chapter 6 § SQL aggregate functions, or set functions, which  operate on a group of values to produce a single,  summarizing value. § Aggregate applied to a set of rows:       - all the rows in a table       -only those rows specified by a WHERE               clause       - the rows created by a GROUP BY clause
Background image of page 2
10/19/10 GROUP BY clause § Groups rows  § Often used with a HAVING clause, which filters  groups § Returns a single statistic: §     -a sum, minimum, or average
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/19/10 Using Aggregate Functions § Aggregate Functions
Background image of page 4
10/19/10 Creating Aggregate Expressions § An aggregate expression can’t appear in a WHERE  clause § You can use more than one aggregate expression in a  SELECT clause § You can’t mix nonaggregate (row-by-row) and  aggregate expressions in a SELECT clause § SELECT-all nonaggregate expressions or all aggregate  expressions § Exception – you  can  mix nonaggregate and aggregate 
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/19/10 Creating Aggregate Expressions Continued § Can’t nest aggregate functions § You can use aggregate expressions in subqueries. § You can’t use subqueries in aggregate expressions.
Background image of page 6
10/19/10 Finding a Minimum with MIN() § Use the aggregate function MIN () to find the  minimum of a set values.  § Type: MIN (expr) § Expr is a column name, literal, or numeric expression.  The result’s data type is at least as precise as the most  precise data type used in expr. § MIN() works with character, numeric, and datetime  data types.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/19/10 Finding a Maximum with MAX() § Use the aggregate function MAX() to find the  maximum set of values.  § Type: MAX(expr) § MAX() works with character, numeric, and datetime  data types.  § With character data columns, MAX() finds the value  that is highest in the sort sequence.
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 29

Itec350Group_Chapter6_PowerpointPresentation2 - Chapter 6...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online