troubleshooting Question

Orable Turn two separate queries into a single row

Avatar of pm-archtect
pm-archtectFlag for United Kingdom of Great Britain and Northern Ireland asked on
Oracle Database
2 Comments1 Solution396 ViewsLast Modified:
Hi

Is it possible to take the following two queries and turn them in to one single row as a result?

SELECT COUNT(UNIT) AS RECEIVEDTODAY
FROM UNIT_KILOMETRAGE_HISTORY_VIEW
WHERE LINE = 'TestOne' AND TRUNC(DATERECEIVED) = SYSDATE

This might yield a number such as 6

SELECT COUNT(UNIT) AS PAST5DAYS
FROM UNIT_KILOMETRAGE_HISTORY_VIEW
WHERE LINE = 'TestOne' AND TRUNC(DATERECEIVED) = SYSDATE - 4

This might yield a different number such as 15
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros