Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle APEX Best Practices

You're reading from   Oracle APEX Best Practices Make the most of Oracle Apex with this guide to best practices. It will help you look at the bigger picture when building applications and take more elements into account such as security and performance.

Arrow left icon
Product type Paperback
Published in Nov 2012
Publisher Packt
ISBN-13 9781849684002
Length 298 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Oracle APEX Best Practices
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Prepare and Build 2. Leveraging the Database FREE CHAPTER 3. Printing 4. Security 5. Debugging and Troubleshooting 6. Deploy and Maintain Database Cloud Service and APEX 4.2 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...

You have been reading a chapter from
Oracle APEX Best Practices
Published in: Nov 2012
Publisher: Packt
ISBN-13: 9781849684002
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image