you have not provided an example of the required outcome and there are some inconsistencies in your requirement
[QUOTE]a machine has stopped in 24 hours[/QUOTE]you only have an amount of time stopped and a date in your data, so can only be stopped in a day (which is not the same as 24 hours which could be from midday to midday)
I would like to add the downtime into hoors and days
since the downtime cannot be more than a day for any given day, don't understand where the days come from
suggest something like this to get you going
Code:
SELECT Machine, Date, sum(No) as timesStop, sum(timevalue(Stop)) as downtime
FROM tblOEE
WHERE NO<>0
GROUP BY Machine, Date
note that Date and No are reserved words - so using them as a field name can cause unexpected errors with misleading error messages