Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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 Business Intelligence : The Condensed Guide to Analysis and Reporting

You're reading from   Oracle Business Intelligence : The Condensed Guide to Analysis and Reporting An introduction to Oracle Business Intelligence Solutions for business analysis and reporting

Arrow left icon
Product type Paperback
Published in Oct 2010
Publisher Packt
ISBN-13 9781849681186
Length 184 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Yuli Vasiliev Yuli Vasiliev
Author Profile Icon Yuli Vasiliev
Yuli Vasiliev
Arrow right icon
View More author details
Toc

Using analytic SQL functions


Analytic SQL is one of those Oracle Database native features that you can start using immediately after installing the database. Of course, you will also need some data stored in the database to play with. However, the data available in the demonstration database schemas can be quite enough to begin with.

Answering simple questions

As stated earlier, there are business questions that can be answered with a simple SQL query issued against the database. Questions starting with "how many" are a good example. Often, to answer such questions, you can use the COUNT SQL function. For example, you might need to know how many employees in your organization have been working for the company for 15 years or more. In this example, you might query the employees table located in the hr/hr demonstration schema, issuing the following statement:

SELECT count(*) FROM employees WHERE (EXTRACT(YEAR FROM (SYSDATE)) - EXTRACT(YEAR FROM (hire_date))) >= 15;

The output should look...

lock icon The rest of the chapter is locked
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