Hi Keld
not sure, if I understand your request ?!?
How can I count the number og unique RunIDs created per day?
=> Thats exactly the same - one Run ID per Dataset in the DB.
If you want the Runid to be displayed simply add "ah_idnr" to the select.
select distinct AH_CLIENT,ah_idnr, AH_OTYPE, COUNT(*) OVER (ORDER BY ah_client, AH_OTYPE)from ah
where ah_otype in ('JOBS','JOBF','SCRI','JOBP')
and ah_client in ('9999','9998')
--FROM date
and AH_TimeStamp2 >= to_date('2018-06-12 00:00:00','yyyy-mm-dd hh24:mi:ss')
--until date
and AH_TimeStamp2 <= to_date('2018-06-12 23:59:59','yyyy-mm-dd hh24:mi:ss')
order by ah_client, ah_otype
cheers, Wolfgang