Translate to Tamil

Earn Money


Best Offers

Amazon Best Offers

Offers

Best Online Offers

Amazon Offers

Earn Money Short URL

Saturday, 24 December 2011

SQL Avg

The AVG() function returns the average value of a numeric column.

Syntax 
SELECT AVG(column_name) FROM table_name


The "custmast"  table

custcode
custname
city
qty
rate
1
Siva
Srivilliputtur
50
70
2
Bala
Sivakasi
30
56
3
Kanna
Madurai
100
200
4
Vijay
Chennai
30
30
5
Kodee
Sandnes
60
80
6
Vicky
Srivilliputtur
60
30

Example : 

SELECT AVG(Rate) AS AvgRate FROM Custmast

Output :

AvgRate
77.666666

 Share This Post


No comments:
Write comments

Contact form

Name

Email *

Message *

Infolinks

© 2014