Q:

SQL query, MAX date, group by

Can someone help me with a sql query? I'm looking for the most recent date (datum). It has the same OBJID but not the same RADOMGID.
BESADR  ARSMEDEL    METOD   DATUM       FNR         BYGGID  OBJID   RADOMGID

bladv   410         spar    20040930    40014686    1       14778   13640

bladv   340         m       19860505    40014686    1       14778   1026

Thanks. 

A:

Do a GROUP BY, with MAX to find each OBJID's max datum:
select OBJID, max(DATUM)
from tablename
group by OBJID

If you want the whole row (with max datum), use NOT EXISTS to exclude older rows:
select *
from tablename t1
where not exists (select 1 from tablename t2
                  where t2.OBJID = t1.OBJID
                    and t2.datum > t1.datum)

Will return both rows if there's a tie.

