Collections:
Use Group Functions in the SELECT Clause in Oracle
How To Use Group Functions in the SELECT Clause in Oracle?
✍: FYIcenter.com
If group functions are used in the SELECT clause, they will be used on the rows that meet the query selection criteria, the output of group functions will be returned as output of the query. The following select statement returns 4 values calculate by 4 group functions on all rows of the "departments" table:
SQL> SELECT COUNT(*), MIN(department_id), 2 MAX(department_id) FROM departments; COUNT(*) MIN(DEPARTMENT_ID) MAX(DEPARTMENT_ID) ---------- ------------------ ------------------ 27 10 270
2019-11-21, 813👍, 0💬
Popular Posts:
Where to find MySQL database server tutorials? Here is a collection of tutorials, tips and FAQs for ...
How AdventureWorksLT tables are related in SQL Server? There are 12 user tables defined in Adventure...
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...
What Are Date and Time Functions in MySQL? MySQL offers a number of functions for date and time valu...
How To Generate Random Numbers with the RAND() Function in SQL Server Transact-SQL? Random numbers a...