In the last chapter, you learned about aggregate functions. These functions calculated a value, such as a sum or a count, over the values in a column and showed you a single row of results. In this chapter, you’ll learn how to write a query that groups your results. What does that mean?
Grouping Your Data
ID | LAST_NAME | SALARY | OFFICE_ID |
---|---|---|---|
1 | JONES | 30000 | 1 |
2 | SMITH | 35000 | 2 |
3 | KING | 45000 | 2 |
4 | SIMPSON | 52000 | 1 |
5 | ANDERSON | 31000 | (null) |
6 | COOPER | (null) | 1 |
7 | ADAMS | (null) | 3 |
8 | SMITH | 62000 ... |