How do I find the latest TimeStamp(DateTime) for each of my products in combination with another con

Posted by radbyx on Stack Overflow See other posts from Stack Overflow or by radbyx
Published on 2010-05-24T19:45:51Z Indexed on 2010/05/24 20:01 UTC
Read the original article Hit count: 137

Filed under:

Hi, I've two tables:

Product:
ProductID
ProductName

StateLog:
StateLogID
ProductID (Foreign Key)
State (bit)
TimeStramp (DateTime)

I need to find the heighest StateLog.TimeStamp for each StateLog.ProductID there have the StateLog.State = 0

© Stack Overflow or respective owner

Related posts about sql