8093-devToTest_2442_3 #3100

Merged
alexm merged 284 commits from 8093-devToTest_2442_3 into test 2024-10-15 06:51:43 +00:00
1 changed files with 2 additions and 6 deletions
Showing only changes of commit 2962bd13c7 - Show all commits

View File

@ -28,9 +28,7 @@ BEGIN
CREATE OR REPLACE TEMPORARY TABLE tPriceDelta CREATE OR REPLACE TEMPORARY TABLE tPriceDelta
(INDEX (itemFk)) (INDEX (itemFk))
ENGINE = MEMORY ENGINE = MEMORY
SELECT * FROM SELECT i.id itemFk,
(
SELECT i.id itemFk,
SUM(IFNULL(pd.absIncreasing,0)) absIncreasing, SUM(IFNULL(pd.absIncreasing,0)) absIncreasing,
SUM(IFNULL(pd.ratIncreasing,0)) ratIncreasing, SUM(IFNULL(pd.ratIncreasing,0)) ratIncreasing,
pd.warehouseFk pd.warehouseFk
@ -48,9 +46,7 @@ BEGIN
WHERE (pd.fromDated IS NULL OR pd.fromDated <= vShipped) WHERE (pd.fromDated IS NULL OR pd.fromDated <= vShipped)
AND (pd.toDated IS NULL OR pd.toDated >= vShipped) AND (pd.toDated IS NULL OR pd.toDated >= vShipped)
AND (pd.zoneGeoFk IS NULL OR zg2.lft BETWEEN zg.lft AND zg.rgt) AND (pd.zoneGeoFk IS NULL OR zg2.lft BETWEEN zg.lft AND zg.rgt)
ORDER BY zg.`depth` DESC GROUP BY itemFk;
LIMIT 10000000000000000000
) sub GROUP BY itemFk;
CREATE OR REPLACE TEMPORARY TABLE tSpecialPrice CREATE OR REPLACE TEMPORARY TABLE tSpecialPrice
(INDEX (itemFk)) (INDEX (itemFk))