Hi Vassilis! <snip> SELECT * FROM [products] p inner join (SELECT prod_type, min(prod_rank) prod_rank FROM [products] p2 GROUP BY prod_type ) xx ON p.prod_type= xx.prod_type and p.prod_rank = xx.prod_rank ORDER BY p.prod_rank </snip>
Great to hear from you and thanks for that wonderful solution. Your example SQL works perfectly :) Efxaristo! (big thanks if I got that wrong!) Malcolm _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

