Discussion Locked

SQL -- obtaining median and quartiles

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Oracle SQLPlus or PL/SQL or ?

A large table with daily weather
observations over 50 years.

I am trying to list the median and quartiles grouped by day of the year. Because of missing records there are not 50 records for each date - number varies.

Anyone have a SQL script for this?

3 replies

by twick

The TOP predicate works for this in MS Access, which may not translate to Oracle SQLPlus.

From the Access Help topic:

SELECT TOP n [PERCENT] FROM

Returns a certain number of records that fall at the top or the bottom of a range specified by an ORDER BY clause.

This discussion is closed to new replies.