
March 16th, 2013, 07:39 PM
|
Registered User
|
|
Join Date: Jun 2012
Posts: 11
Time spent in forums: 1 h 59 m 53 sec
Reputation Power: 0
|
|
Hi,
Replace "thedate" with the name of the date field in your table:
Code:
select a.part
,b.expeditor
,b.forecast
,b.dos
,a.partcount
from (select part
,max(thedate) as maxdate
,count(part) as partcount
from partleveldetail
group by part
) as a
inner join partleveldetail as b
on b.part=a.part
and b.thedate=a.maxdate
order by a.part
|