SUM() 函数的使用
This commit is contained in:
16
数据库/头歌/SUM() 函数的使用/1. SUM() 函数的使用.sh
Normal file
16
数据库/头歌/SUM() 函数的使用/1. SUM() 函数的使用.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
USE Mall
|
||||
GO
|
||||
|
||||
SET NOCOUNT ON
|
||||
|
||||
------ return the amount of all products ------
|
||||
-- ********** Begin ********** --
|
||||
|
||||
SELECT SUM(prod_price * quantity) as amount
|
||||
FROM Products
|
||||
|
||||
-- ********** End ********** --
|
||||
|
||||
GO
|
||||
|
||||
|
Reference in New Issue
Block a user