Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the aggregate functions in SQLServer

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what are the aggregate functions in SQLServer. It is very detailed and has certain reference value. Friends who are interested must finish reading it.

Aggregate function

The aggregate function calculates a set of values and returns a single value. With the exception of the count (count of items) function, all aggregate functions ignore null values (null) in their formulas. All aggregate functions are deterministic.

The average avg () is the sum of a set of numbers, and then divided by the number of null, the average is obtained.

Select avg (id) from test1 avg (column name)

Minimum value min () maximum value max ()

Select min (id) from test1select max (id) from test1

Summation sum ()

Select sum (id) from test1

Calculate the total count ()

Select count (id) from test1

Grouping

Count the total scores of students and sort select stu_id as student numbers, name as student names, SUM (Chinese + English + math + algebra) as total score from tb_stuAchievement ORDER BY total score DESCGROUP BY stu_id, name above are all the contents of this article "what are the aggregate functions in SQLServer"? thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report