Job
--------
Id
Description
JobStatus
----------
Id
JobId
StatusTypeId
Date
How do I get the current JobStatus
for all jobs?
so something like....
SELECT * FROM Job j
INNER JOIN ( /* Select rows with MAX(Date) grouped by JobId */ ) s
ON j.Id = s.JobId
(I'm sure there are a bunch of similar questions already but I couldn't find anything which exactly does what I need).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…