Articles → SQL SERVER → Aggregate functions in SQL Server

Aggregate functions in SQL Server


















Student


Student_IDStudent_Name
1Karan
2Sumit
3Ashish





Subjects


Subject_IDSubject_Name
1Mathematics
2Social Studies
3General Science





Marks


Primary_Key_IDStudent_IDSubject_IDMarks
11185
21265
31360



Sum


select sum(Marks) from Marks where Student_ID = 1





Avg


select avg(Marks) from Marks where Student_ID = 1





Max


select max(Marks) from Marks where Student_ID = 1





Count


select count(*) from department where Student_ID = 1





Posted By  -  Karan Gupta
 
Posted On  -  Monday, March 29, 2010

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250