Using the GROUP BY clause

The GROUP BY clause allows you to group rows that have the same values into summary rows. This clause is often used with aggregate functions, which were covered in the previous section of this chapter. It's an optional clause that can be used on a SELECT statement. 

The following code shows the GROUP BY syntax, where the WHERE and ORDER BY clauses are optional: 

SELECT column(s) 
FROM table
WHERE condition(s)
GROUP BY columns(s)
ORDER BY column(s);

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.113.193