•Syntax
•Group functions:
–Use AVG, SUM, MIN, MAX, COUNT
–Use DISTINCT keyword within group functions
–NULL values in a group function
•Grouping rows:
–GROUP BY clause
–HAVING clause
Notice:
All columns in the SELECT list that are not in an aggregate function must be in the GROUP BY clause, but the GROUP BY column does not have to be in the SELECT list.
Can’t use the WHERE clause to restrict groups, but use the HAVING clause to restrict groups.
the example is oracle default instance: ORCL, unlock the user HR.
浙公网安备 33010602011771号