Can anyone please suggest a flexible query to get all products which have been added within H number of hours in hybris?
You can use SQL functions.
This should work for SQL Server:
SELECT * FROM {Product} WHERE {creationtime} > DATEADD(mi,-60,GETDATE())
The DATEADD portion means means subtract 60 minutes from the current date.
For other databases, you may need to look for a similar or equivalent function.