Previously i wanted to find
1- Batch id's 2- Upload time 3- Count of requests infront of each batch
i wrote the following query and it worked perfectly
SELECT REQUEST_BATCH_ID,To_CHAR(B.UPDATE_STAMP , 'DD/MM/YYYY HH24'),COUNT(*)
FROM bpdata.bulk_prov_detail B
WHERE B.REQUEST_BATCH_ID
IN
(
SELECT REQUEST_BATCH_ID
FROM bpdata.bulk_prov_master A
where A.START_TIME > to_DATE ('12/16/2014 00', 'MM/DD/YYYY HH24')
)
GROUP BY To_CHAR(B.UPDATE_STAMP , 'DD/MM/YYYY HH24'),REQUEST_BATCH_ID
order by 1 desc,2 desc
and I get the data in following format
Batch_ID Day/Date Count(*)
257658 17/12/2014 11 5
257658 17/12/2014 12 4
257657 17/12/2014 12 4
257656 17/12/2014 12 2
But now I want to count the total number of count() and the largest number of count() and I am unable to devise a query for that. Your help and guidance would be appreciated in that regard
EDITED: Example of Required Output
Batch_ID Day/Date Count(*)
257658 17/12/2014 11 5
257658 17/12/2014 12 4
257657 17/12/2014 12 4
257656 17/12/2014 12 2
Sum(Count(*)) Largest_request Time
15 5 17/12/2014 11
Sum(Count(*)) and Largest_request and time is what I need now