Home arrow BrainDump arrow Page 3 - All About SQL Functions

STDEV - BrainDump

In the last tutorial we left off with the SUM(column) function. In this article we will cover the remaining Aggregate Functions and the Scalar Functions. We might even make some fat jokes, some mama jokes, and as always, some nerd jokes.

TABLE OF CONTENTS:
  1. All About SQL Functions
  2. More Aggregate Functions
  3. STDEV
  4. Scalar Functions
  5. Mid(c,start[,end]
  6. Round(c,decimals)
By: James Payne
Rating: starstarstarstarstar / 8
December 17, 2007

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

When you are dealing with a huge amount of data, STDEV can return the Standard Deviation of a column. You have to have a minimum of two values or the value returned will be null.

Here is how it looks in code:


Select STDEV(Salary) As SDSalary

From Employees

The above function takes a sampling of your data instead of the whole list, and returns the standard deviation.

STDEVP

If you want to work with all the data in a column to find the standard deviation, you can use STDEVP instead.


Select STDEVP(Salary) As DevSalary

From Employees

VAR

The VAR Function allows you to find the variance of a set of data from a column. Like STDEV, VAR only works with a sampling and not the whole column. And again, you must have at least two values in the column or a null will be returned.


Select VAR(Salary) As VARSalary

From Employees

VARP

To get a variance using all of the data in a column, use this handy little guy.


Select VARP(Salary) As VARPSalary

From Employees



 
 
>>> More BrainDump Articles          >>> More By James Payne
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

BRAINDUMP ARTICLES

- Apple Founder Steve Jobs Dies
- Steve Jobs` Era at Apple Ends
- Google's Chrome Developer Tool Updated
- Google's Chrome 6 Browser Brings Speed to th...
- New Open Source Update Fedora 13 is Released...
- Install Linux with Knoppix
- iPad Developers Flock To SDK 3.2
- Managing a Linux Wireless Access Point
- Maintaining a Linux Wireless Access Point
- Securing a Linux Wireless Access Point
- Configuring a Linux Wireless Access Point
- Building a Linux Wireless Access Point
- Migrating Oracle to PostgreSQL with Enterpri...
- Demystifying SELinux on Kernel 2.6
- Yahoo and Microsoft Create Ad Partnership

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: