Welcome To Latest Dot Net Interview Questions and Answer.

In this Blog you can find all to Dot Net Interview Question and Answer. you can find Scenario based ASP.Net, VB.Net, C# and SQL Server Interview Questions and answers. Dot Net Jobs, Dot Net Books. SQL Server Books, Dot Net Based Company. Dot Net and SQL Server Training Institute.

Visual Studio.Net advanced Interview Questions, SQL Server advanced Interview Questions, Latest Interview Questions,ASP.NET, SQL Server, VB.Net, C#.Net and ADO.NET Interview Questions.Scenario Based Interview Questions. Visual Studio.Net Books and SQL Server Books. Technical Interview Questions, HR Interview Questions

In this Blog You can Find ASP.NET Web Application Projects Idea , C# Windows Application Projects Idea. VB.Net Windows Application Projects Idea, SQL Server Data Base Concept.

Aggregate Functions in SQL SERVER 2008

What are Aggregate functions? Explain Aggregate functions in SQL SERVER 2008 with example.

Aggregate functions are applied to a group of data values from a column. Aggregate functions always return a single value.


SQL SERVER 2008 / Transact-SQL supports following aggregate functions:

AVG: Calculates the arithmetic mean (average) of the data values contained within a column. The column must contain numeric values.

MAX and MIN: Calculate the maximum and minimum data value of the column, respectively. The column can contain numeric, string, and date/time values.

SUM: Calculates the total of all data values in a column. The column must contain numeric values.

COUNT: Calculates the number of (non-null) data values in a column. The only aggregate function not being applied to columns is COUNT(*). This function returns the number of rows (whether or not particular columns have NULL values).

COUNT_BIG: New and Analogous to COUNT, the only difference being that COUNT_BIG returns a value of the BIGINT data type.

Aggregate function Example:
SELECT ProjectName, SUM(budget) TotalBudget FROM Project_Tbl GROUP BY ProjectName;

0 comments

Post a Comment

My Profile

I have 4 years Experience .Net and SQL Server. I am working as software engineer in private company Bangalore. I have faced many interviews. Here I am Sharing My Interview experience (Technical, HR and Written Test). This Blog is useful for .Net Developers and Freshers. My hobbies I like to play Foot ball, to read some books, to Learn new technologies. I have Experienced in Asp.Net 2.0, C#.Net, VB.Net, SQL Server and Xml.