Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group By
Message
From
20/04/2009 18:38:39
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Group By
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01395684
Message ID:
01395684
Views:
125
I'm having a group by brain-fart. Somebody please point me in the right direction...

I have the following data:
ID|FK|Status|StartDate
1|1|Started|1/1/2008
2|1|Finished|1/2/2008
3|2|Started|3/2/2008
4|3|Started|5/1/2008
5|3|Finished|5/4/2008
This is a transactional flow of items through statuses. I would like to see what status each item is currently set to, which should be the greatest StartDate. In my example, I want to see:
FK|Status
1|Finished
2|Started
3|Finished
Thanks in advance!
Very fitting: http://xkcd.com/386/
Next
Reply
Map
View

Click here to load this message in the networking platform