Let's say I have a table with the following data-colums:
ID, Name, Company, date.
Now I wanna select from each company the name and date where the column date contains the last date.
I have the following code:
select b.Name, b.Date from #templijst b where date = (SELECT MAX(Date) FROM #templijst) group by Name, Date
But this selects only the row with the last date. Not from each company??
Please Help Me!!