Re: How to design
Posted by: Bob Field
Date: June 09, 2006 09:11AM

Generally to do this you want to join the table to itself using the grouping field, and add to the join condition a value comparison, then select only rows not matching any greater values:

SELECT t1.*
FROM t1 LEFT JOIN t2 ON t1.group = t2.group AND t1.score < t2.score
WHERE t2.score IS NULL;

Options: ReplyQuote


Subject
Written By
Posted
June 09, 2006 09:02AM
Re: How to design
June 09, 2006 09:11AM
June 09, 2006 09:25AM
June 09, 2006 12:54PM
June 11, 2006 12:54AM
June 11, 2006 10:02AM
June 11, 2006 11:31AM
June 11, 2006 12:24PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.