Avatar of pm-archtect
pm-archtect
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Orable Turn two separate queries into a single row

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
Oracle Database

Avatar of undefined
Last Comment
pm-archtect

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
slightwv (䄆 Netminder)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
pm-archtect

ASKER
Brilliant - does just what it says on the tin.  Very fast response, thank you.
Your help has saved me hundreds of hours of internet surfing.
fblack61