Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 4th, 2005, 04:15 AM
ErwinWarrinnier ErwinWarrinnier is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 1 ErwinWarrinnier User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > corresponding date for MAX value in a certain period


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT