某數(shù)據(jù)庫中有表Table_Good((GoodsID,GoodsName,SaleUnitPrice)和表Table_GoodsClass(GoodsClass
某數(shù)據(jù)庫中有表Table_Good((GoodsID,GoodsName,SaleUnitPrice)和表Table_GoodsClass(GoodsClassID,GoodsClassName,Sum),對(duì)家用電器類商品進(jìn)行分類顯示,如果商品的單價(jià)高于3000,則顯示‘高檔商品’;如果單價(jià)在1000-3000,則顯示‘中檔商品’;如果單價(jià)低于1000的顯示‘低檔商品’。完成下列的SQL語句。
SELECT GoodsName,SaleUnitPrice,Type=CASE
_______
______
______
END
FROM ______
ON _______
WHERE GoodsClassName=‘家用電器’
正確答案:WHEN SaleUnitPrice>3000 THEN‘高檔商品’WHEN SaleUnitPrice BETWEEN 1000 AND 3000 THEN‘中檔商品’WHEN SaleUnitPrice1000 THEN‘低檔商品’Table_Goods a JOIN Table_GoodsClass ba.GoodsID=b.GoodsClassIDWHEN SaleUnitPrice>3000 THEN‘高檔商品’WHEN SaleUnitPrice BETWEEN 1000 AND 3000 T
詞條內(nèi)容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學(xué)等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。