ソースコード

-- select SKU_CODE,GOODS.STD_COST_PRICE from SKU
--     join (
--     select GOODS_CODE,avg(STD_COST_PRICE) as av from SKU
--     group by GOODS_CODE
--     ) as T1 on SKU.GOODS_CODE = T1.GOODS_CODE
-- join GOODS on GOODS.GOODS_CODE = SKU.GOODS_CODE
-- where GOODS.STD_COST_PRICE < T1.av
;
-- UPDATE SKU SET STD_COST_PRICE = GOODS.STD_COST_PRICE,UPDATE_USER_NAME='MODIFY',USER_UPDATE_DATETIME='2024-08-31 00:00:00' 
-- from GOODS
--     join (
--     select GOODS_CODE,avg(STD_COST_PRICE) as av from SKU
--     group by GOODS_CODE
--     ) as T1 on GOODS.GOODS_CODE = T1.GOODS_CODE
-- where GOODS.GOODS_CODE = SKU.GOODS_CODE and GOODS.STD_COST_PRICE < T1.av
-- ;
UPDATE SKU SET STD_COST_PRICE = T.STD_COST_PRICE,UPDATE_USER_NAME='MODIFY',USER_UPDATE_DATETIME='2024-08-31 00:00:00' 
from (
    select SKU_CODE,GOODS.STD_COST_PRICE from SKU
        join (
        select GOODS_CODE,avg(STD_COST_PRICE) as av from SKU
        group by GOODS_CODE
        ) as T1 on SKU.GOODS_CODE = T1.GOODS_CODE
    join GOODS on GOODS.GOODS_CODE = SKU.GOODS_CODE
) as T;
提出情報
提出日時2024/08/30 13:18:09
コンテスト第2回 SQLコンテスト初級編
問題原価更新
受験者moajo
状態 (詳細)TLE
(Time Limit Exceeded: 時間制限オーバー)
メモリ使用量108 MB
メッセージ
テストケース(通過数/総数)
0/3
状態
メモリ使用量
データパターン1
WA
106 MB
データパターン2
WA
108 MB
データパターン3
TLE
MB