BrainDump
  Home arrow BrainDump arrow Page 3 - All About SQL Functions
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

All About SQL Functions
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2007-12-17

    Table of Contents:
  • All About SQL Functions
  • More Aggregate Functions
  • STDEV
  • Scalar Functions
  • Mid(c,start[,end]
  • Round(c,decimals)

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    All About SQL Functions - STDEV
    (Page 3 of 6 )

    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


     

       

    BRAINDUMP ARTICLES

    - Outsourcing: the Hoopla, the Reality
    - MySQL Plays in the Sun
    - All About SQL Functions
    - SQL: Functioning in the Real World
    - More Advanced SQL Statements
    - Beginning SQL the SEQUEL: Working with Advan...
    - Beginning SQL
    - A Look at the VI Editor
    - A Quick Tour of Boo
    - Book Review: Open Source Licensing
    - PGP and GPG: Email for the Practical Parano...
    - Microsoft Continues War on Open Source
    - Secure Remote Desktop Sharing with VNC on Li...
    - A Look at Google Project Hosting
    - What we can Learn from Two Linux vs. Microso...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway