select cursor1.pkfield,cursor1.maxfield,table1.anotherfield from cursor1 inner join table1 on table1.pkfield = cursor1.pkfield into cursor cursor2>>Hi All
SELECT <pkfield>,max(field2) as maxfield from <table1> group by <pkfield> into cursor <cursor1>>>
SELECT <field1> from <table1> where <pkfield> in (select <pkfield> from <cursor1>) into cursor <cursor2>>>
SELECT <field1> from <table1> where <pkfield> in (select <pkfield> from (SELECT <pkfield>,max(field2) as maxfield from <table1> group by <pkfield>))