Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Oracle SQL: How to have divide 2 queries

Avatar of Maliki Hassani
Maliki HassaniFlag for United States of America asked on
Oracle DatabaseSQL
21 Comments1 Solution860 ViewsLast Modified:
Experts!

I have two queries that will produce a number (Count).  I would like to have the divide into each other to get a two decimal percentage.  I have no idea how to do the divison and make it look like a percentage.

Here are the two queries.
Query 1: Tickets Created:
SELECT COUNT(*) FROM ARADMIN.DAC WHERE SIMPLE_STATUS = 0)

Query 2: Tickets in Open Status: 
(SELECT COUNT(*) FROM ARADMIN.DAC WHERE UDF_CONVERT_UNIX_DATETIME(DATE_CREATED, 'US/Eastern') >= (TRUNC(SYSDATE) - INTERVAL '8' HOUR) AND UDF_CONVERT_UNIX_DATETIME(DATE_CREATED, 'US/Eastern') < (TRUNC(SYSDATE) - INTERVAL '0' HOUR))