• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 46. Aggregates > Filtering Results

Filtering Results

Aggregated data can be filtered in two ways to allow you complete flexibility within SELECT statements:

  • You can use the WHERE clause to filter rows before they are grouped. Rows excluded by the WHERE condition are not included in aggregate calculations and processing. WHERE conditions can be used regardless of whether grouping is used and can reference any valid expression.

  • You can use the HAVING clause to filter entire groups. This condition is applied after groups have been processed to eliminate aggregate values that do not match a specific condition. HAVING can be used only in conjunction with grouping and can reference any items in the select list.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint