Skip to main content

mes.spGetOEEDataByIntervalGroupByItem

Description

Returns OEE performance indicators grouped by item over hourly, daily, or weekly intervals. Useful for analyzing item-specific efficiencies regardless of shift structure. Data includes duration, runtime, downtime, and count-based calculations for each item.

Syntax

mes.spGetOEEDataByIntervalGroupByItem @assetId, @startDate, @endDate, @interval

Parameters:
@assetId (int): The asset to analyze.
@startDate, @endDate (datetime): Date/time boundaries for analysis.
@interval (varchar): One of 'Hour', 'Day', or 'Week'.

Returns:
List of time-bucketed rows per item containing:
- Item ID, name, package count, and units
- Runtime and downtime metrics
- Raw and normalized counts
- Target and actual performance values
- Final OEE calculation

Code Example

EXEC mes.spGetOEEDataByIntervalGroupByItem
@assetId = 2048,
@startDate = '2025-07-01',
@endDate = '2025-07-10',
@interval = 'Hour';