AVG() 函数的使用
This commit is contained in:
parent
9ccd5e1a89
commit
3fdd06a507
13
数据库/头歌/AVG() 函数的使用/AVG() 函数的使用.sh
Normal file
13
数据库/头歌/AVG() 函数的使用/AVG() 函数的使用.sh
Normal file
@ -0,0 +1,13 @@
|
||||
USE Mall
|
||||
GO
|
||||
|
||||
SET NOCOUNT ON
|
||||
|
||||
------ return two columns that the price bigger than average price ------
|
||||
-- ********** Begin ********** --
|
||||
SELECT prod_name, prod_price
|
||||
FROM Products
|
||||
WHERE prod_price > (SELECT AVG(prod_price) FROM Products)
|
||||
-- ********** End ********** --
|
||||
|
||||
GO
|
Loading…
x
Reference in New Issue
Block a user