feat(lstv2 move): moved lstv2 into this app to keep them combined and easier to maintain
This commit is contained in:
17
lstV2/server/services/sqlServer/querys/eom/lastSalesprice.ts
Normal file
17
lstV2/server/services/sqlServer/querys/eom/lastSalesprice.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export const lastSalesPriceCheck = `
|
||||
use AlplaPROD_test1
|
||||
|
||||
select * from
|
||||
(select IdArtikelvarianten as av,
|
||||
VKPreis as salesPrice,
|
||||
MPB, FWMPAlpla,
|
||||
FWMPB,
|
||||
ROW_NUMBER() over(partition by IdArtikelVarianten order by gueltigabdatum desc) rn,
|
||||
convert(date, gueltigabdatum, 120) as validDate
|
||||
from dbo.T_HistoryVK (nolock)
|
||||
where convert(date, gueltigabdatum, 120) <= '[date]' and StandardKunde = 1) a
|
||||
where rn =1
|
||||
order by av asc,
|
||||
validDate desc
|
||||
|
||||
`;
|
||||
Reference in New Issue
Block a user