Minggu, 06 Februari 2011

Calculate Median in SQL Server

Median is the numeric value that separates higher half of the list from the lower half. If the list contains odd number of values, median is the number available at the position(n+1)/2 when numbers are arranged in ascending order. Otherwise it is the average of the numbers at position (n+1)/2 and (n+2)/2. Let us see both these scenarios with examples Scenario 1: Odd number of valuesCreate a

Tidak ada komentar:

Posting Komentar