RelationalDBDesign
prev next prev next
  Course navigation
 
Lesson 2
Objective
GROUP BY clause introduction
Understand when to use the GROUP BY clause.
    One of the most common requests is, of course, to summarize data from the database so it appears in a much more usable form.
The SQL language is one that excels at
  1. selecting rows,
  2. returning them to the user, and
  3. allowing the user to make summaries and changes.
It also has some very strong clauses you can add to your SELECT statement that can do some of the work for you when it comes to aggregating, or pulling together, related rows in your results set.
The GROUP BY clause lets you tell the SQL engine what rows should be condensed into one, and what elements should be considered when the grouping occurs. This sounds complicated, but it's not. The next lesson gives an example.
Case Based Reasoning works better for those cases where it is harder to develop a linear model for.
  Course navigation