HBNU-School/数据库/头歌/SUM() 函数的使用/1. SUM() 函数的使用.sh
2024-11-19 15:21:51 +08:00

17 lines
209 B
Bash

USE Mall
GO
SET NOCOUNT ON
------ return the amount of all products ------
-- ********** Begin ********** --
SELECT SUM(prod_price * quantity) as amount
FROM Products
-- ********** End ********** --
GO