Sams Teach Yourself SQL in 24 Hours

Sams Teach Yourself SQL in 24 Hours

By Ron Plew and Ryan Stephens

Q&A

  1. Is using the GROUP BY clause mandatory when using the ORDER BY clause in a SELECT statement?

    No. Using the GROUP BY clause is strictly optional, but it can be very useful when used with ORDER BY.

  2. What is a group value?

    Take the CITY column from the EMPLOYEE_TBL. If you select the employee's name and city, and then group the output by city, all the cities that are identical are arranged together.

  3. Must a column appear in the SELECT statement to GROUP BY it?

    Yes, a column must be in the SELECT statement to GROUP BY it.

Share ThisShare This

Informit Network