Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Select Construct
Is there a way in Oracle SQL to extract the median of the 3 teams and
their scores but only using the latest scores and ignoring older scores?
select median(Score) from scores where ... etc
How can this be done? Again the three distinct teams but the median of the latest 3 scores. The table will only have these three distinct teams but scores from different dates.
Also this is an example. I am not a degenerate gambler or online gamer etc. Thanks!
Scores Table and data:
Team Score Date
Giants 15 10/11/2007 Cowboys 20 10/1/2007 Eagles 30 10/9/2007 Giants 5 9/11/2007 Cowboys 32 9/1/2007 Eagles 13 9/9/2007Received on Tue Oct 16 2007 - 14:46:13 CDT