
October 4th, 2005, 04:15 AM
|
|
Registered User
|
|
Join Date: Oct 2005
Posts: 1
Time spent in forums: 17 m 40 sec
Reputation Power: 0
|
|
|
corresponding date for MAX value in a certain period
Hi, I have a table with basicly 2 columns i want to get data from (datetime and number values)
Can anyone give me the right sql statement for getting the corresponding date where a maximum value out of the number values within a user defined period (start date - end date)
Eg table:
date number
---- -------
01-01-2005 8000
01-02-2005 2000
01-03-2005 7000
01-04-2005 4000
01-05-2005 9000
If chosen period is start: "01-02-2005" and end: "02-04-2005"
then the query should return "01-03-2005"
Thanks for any answers
|