b.w Guest
|
Posted: Wed Jan 10, 2007 4:45 am Post subject: Paradoc local SQL problem |
|
|
Hello, I have a Challange here and I can't figure it out.
Select select1.nr as nr, Ansatte as antall,maaned,aarstall from avvik,
ansatte ,select1
where (select1.nr=ansatte.select1) and
(avvik.select1=select1.nr)
group by select1.nr,ansatte,maaned,aarstall
order by select1.nr,ansatte,maaned,aarstall
This return something like this
Nr Ansatte Maaned Aarstall
1 279 10 2006
1 275 11 2006 --------->
keep
2 345 10 2006
2 234 11 2006 ------------>
keep
Maaned = month
Aarstall = year
What I would like are the highest month... only one record record for
each number..
Is there a way to go for only return the highest month for Nr1, and Only
return the highest month for Nr 2 a.s.o
Any suggestion.
B |
|