mes.fnGetRunTimesAndCounts
Description
Returns runtime, downtime, and counter totals for a given asset within a time range.Syntax
mes.fnGetRunTimesAndCounts(@assetId, @startDate, @endDate)Parameters:
Returns:
Returns a table with columns:
Code Example
-- Get production runtime and counts summary
SELECT *
FROM mes.fnGetRunTimesAndCounts(2076, '2025-07-01T00:00:00', '2025-07-30T23:59:59');