This chapter covers selecting data from the RDBMS tables using the SELECT statement. As the name implies it deals with selecting data from the RDBMS objects — tables or views — either to be presented to the users, or for some internal purpose. This is the only statement of the data query language (DQL) group.
The use of this statement within a SELECT query is relatively simple, but the SELECT statement rarely executes without clauses, and that's where the fun begins. The select query clauses are probably the most confusing in the SQL and have to be dealt with accordingly. This chapter introduces the topic, covering use of subqueries, compound operators, and aggregate function clauses.