How To Use Group Functions in the SELECT Clause using Oracle?
Submitted by: AdministratorIf 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;
<pre> COUNT(*) MIN(DEPARTMENT_ID) MAX(DEPARTMENT_ID)
---------- ------------------ ------------------
27 10 270</pre>
Submitted by: Administrator
SQL> SELECT COUNT(*), MIN(department_id),
2 MAX(department_id) FROM departments;
<pre> COUNT(*) MIN(DEPARTMENT_ID) MAX(DEPARTMENT_ID)
---------- ------------------ ------------------
27 10 270</pre>
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | How To Write Date and Time Interval Literals in Oracle? |
☺ | How To View the Dropped Tables in Your Recycle Bin? |
☺ | How Run SQL*Plus Commands That Are Stored in a Local File? |
☺ | How To Run SQL*Plus Commands in SQL Developer? |
☺ | How To Use IN Conditions in Oracle? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |