Book Image

Oracle APEX Best Practices

Book Image

Oracle APEX Best Practices

Overview of this book

Have you ever wanted to create real-world database applications? In this book you're not only getting APEX best practices, but will also take into account the total environment of an APEX application and benefit from it."Oracle APEX Best Practices" will guide you through the development of real-world applications. It will give you a broader view of APEX. The various aspects include setting up APEX environment, testing and debugging, security, and getting the best out of SQL and PL/SQL.In six distinct chapters you will learn about different features of Oracle APEX as well as SQL and PL/SQL.Do you maximize the capabilities of Oracle APEX? Do you use all the power that SQL and PL/SQL have to offer? Do you want to learn how to build a secure, fully functional application? Then this is the book you'll need. "Oracle APEX: Best Practices" is where practical development begins!
Table of Contents (14 chapters)
Oracle APEX Best Practices
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Aggregate functions


Creating multilevel totals with aggregate functions might not be the first thing you think about. This has been a capability of the aggregate functionality for quite some time.

The purpose of the GROUP BY clause is to group rows together, based on the columns specified. But with aggregates, you don't always need to specify columns. When you want a grand total, you can omit the GROUP BY clause altogether:

SQL> select sum (sal)
  2    from emp
  3  /

  SUM(SAL)
----------
     29025

Omitting the GROUP BY clause leads to a grand total, but you can also use an empty set in the GROUP BY clause:

SQL> select sum (sal)
  2    from emp
  3   group by ()
  4  /

  SUM(SAL)
----------
     29025

On line 3 the empty set is used, denoted by the opening and closing braces ().

There is a lot more about aggregates, such as GROUPING SETS, ROLLUP, and CUBE.

Grouping sets

In the preceding example, we created a grand total by using an empty set in the GROUP BY clause. The GROUPING SETS clause...