From the course: Learning Oracle Database 19c
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
SELECT statement transformations - Oracle Database Tutorial
From the course: Learning Oracle Database 19c
SELECT statement transformations
- [Instructor] I'm ready to show you more advanced WHERE clauses as well as how you can use GROUP BY to aggregate rows, the HAVING clause to filter your GROUP BY results, and how the ORDER BY puts the results in the right order based on a column or an aggregated result. The terms grouping function and aggregate function are used interchangeably, so you'll see both terms. Remember what the SELECT statement looks like with all the available clauses? The WHERE clause filters rows based on a condition, then the rows are processed by the GROUP BY clause, and the results from GROUP BY are filtered with the HAVING clause. The ORDER BY clause orders the entire result set. In the WHERE clause or HAVING clause operator precedence is important. Operators like multiplication are evaluated before subtraction. All of the operations in the first four lines are evaluated before performing any of the comparison operations. In the example on the left, since AND is evaluated before OR, then the…