Databases| SQL| MySQL| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
Aggregate Functions 
 

In this section, you will learn how use of the aggregate functions.

 

Aggregate Functions

                         

In this section we are going to illustrate aggregate function, with the help of which we can use many arithmetic operation like average, count, maximum and many more in SQL. They are briefly described and denoted by the keyword in the given below section.

AVG
COUNT
MAX
MIN
SUM

For all of the above given function the standard code syntax will be:

 

 

 

SELECT "function type" ("column_name") FROM "table_name"

For example we just take a Employee table and use the aggregate function SUM on the field "Salary" to find out the total salary of the Employee table.

Table Employee:
emp_Name Salery Joining_Date
Amit 15000 Feb-05-2005
Chandan 25000 Feb-17-2005
Ravi 8000 Feb-25-2005
Vinod 7000 Feb-28-2005

To find out the total salary of the company's employee we should write the following code:

SELECT SUM (Salary) FROM Employee;

When we run the above query we will get the following result:

SUM(Salary)
55000

                         

» View all related tutorials
Related Tags: sql mysql c string function fun io sed char return character unc cte to e use from left in m

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

1 comments so far (
post your own) View All Comments Latest 10 Comments:

I need statement in sql select All db name ,sql2005
and statement select all table name in db ,
and statment select the pk in table

Posted by zead qunes on Friday, 01.4.08 @ 04:14am | #44466

Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.