Mode in SQL

by Irina 13. May 2007 12:11

Mode

A mode is type of statistic that refers to the most frequently occurring value in a sample set.

Calculating a Mode

Problem

You want to calculate a modal average of the bulb-life results in your database.

Solution:

SELECT COUNT(*) frequency,Hours mode FROM BulbLife
GROUP BY Hours
HAVING COUNT(*)>= ALL(
   SELECT COUNT(*)
   FROM BulbLife
   GROUP BY Hours)

Tags: mode, tera, sql

TERADATA

Related posts

Comments

11/29/2011 10:51:36 AM


SEO (SEO Company London) has now become a popular way for success of each online business. The SEO procedure is helpful for taking a website in the top position in major search engines such as google, bing and yahoo. Individuals from all over the globe prefer SEO India as India companies offer high quality and cost effective services.


SEO (SEO Company London) has now become a popular way for success of each online business. The SEO procedure is helpful for taking a website in the top position in major search engines such as google, bing and yahoo. Individuals from all over the globe prefer SEO India as India companies offer high quality and cost effective services.

http://www.seosoftwareservices.com

SEO Company India

Add comment


(will show your Gravatar icon)  





Live preview

2/5/2012 8:29:12 PM

 

About the author

Irina Spivak Irina Spivak
Team Leader at G-Stat. More...


Send mail Email

Blogroll

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2012

    Sign in

    eXTReMe Tracker