I have a nHibernate query like this
ICriteria query = session.CreateCriteria(typeof(MyResult)) .Add(Expression.Eq(\"ResultTypeId\", myResult.Resu
In HQLthis might work:
select item, tag from MyItem item join item.Tags tag where tag.Id = ( select max(tag2.Id) from MyItem item2 join item2.Tags tag2 where item2.Id = item.Id group by item2.Id )