From the course: Advanced SQL: Logical Query Processing, Part 1

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Grouping

Grouping - SQL Tutorial

From the course: Advanced SQL: Logical Query Processing, Part 1

Start my 1-month free trial

Grouping

- [Instructor] In a properly designed relational database, every table represents a single relation or a thing in the real world, and every row represents an instance of that thing. Animals, persons, staff and vaccines, all hold the granular attributes or facts about each one of these things. The from clause processed one or more of these sources and passed them to the where clause. The where clause evaluated each row using predicates. In both clauses, processing was of the individual rows but sometimes it's not these details that we're after. Instead we need to answer higher level questions for which grouping comes in handy. Let's quickly revisit the basics. Here is a group of animals. Each animal is represented as a row in a table. If I asked you for the name of all cats, you would need to evaluate each animal row using the predicate Species equal Cat. Only Felix and Calvin's row evaluate to true so the answer…

Contents