feat(psi): psi querys added and av grab right now

This commit is contained in:
2025-08-10 18:11:57 -05:00
parent 52345bc94c
commit 8d63f7f6b0
8 changed files with 250 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
export const productionNumbers = `
use [test1_AlplaPROD2.0_Reporting]
declare @startDate nvarchar(30) = [startDate] --'2024-12-30'
declare @endDate nvarchar(30) = [endDate] --'2025-08-09'
select MachineLocation,
ArticleHumanReadableId as article,
sum(Quantity) as Produced,
count(Quantity) as palletsProdued,
FORMAT(convert(date, ProductionDay), 'M/d/yyyy') as ProductionDay,
ProductionLotHumanReadableId as productionLot
from [reporting_productionControlling].[ScannedUnit] (nolock)
where convert(date, ProductionDay) between @startDate and @endDate and ArticleHumanReadableId in ([articles]) and BookedOut is null
group by MachineLocation, ArticleHumanReadableId,ProductionDay, ProductionLotHumanReadableId
order by ProductionDay
`;