Avatar of pm-archtect
pm-archtectFlag 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
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of pm-archtect
pm-archtect
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Brilliant - does just what it says on the tin.  Very fast response, thank you.
Oracle Database
Oracle Database

Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.

81K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo