November 2003
Intermediate to advanced
816 pages
14h 53m
English
Before looking at GROUP BY, let's recall the general form of the SELECT statement:
SELECT [ DISTINCT ]{ select-item-list | * } FROM table-or-view-list [ WHERE search-condition ] [ GROUP BY column-reference-list ] [ HAVING search-condition ] [ ORDER BY sort-item-list ]
Consider the flow, shown in Figure B-2, from base tables to a series of virtual tables involved in a SELECT statement.

The FROM clause picks which tables and views will be worked on, ultimately going down to all base tables where the actual data is located.
These tables are input to the WHERE clause that then works ...
Read now
Unlock full access