SUM() 函数的使用
This commit is contained in:
parent
cb3e0fd205
commit
00c9df9497
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user