Hi, Would this be the best way, if I was to run query to obtain first 2 records of each category from the database. The database could contain literally 100s of 1000s of records.
select t1.field1, t2.field2 as CommonFld from table1 t1, table2 t2 where t1.keyfield = t2.keyfield and t1.field1 = 'AAA' limit 2 UNION select t1.field1, t2.field2 as CommonFld from table1 t1, table2 t2 where t1.keyfield = t2.keyfield and t1.field1 = 'BBB' limit 2 ORDER BY CommonFld Desc regards Send instant messages to your online friends http://uk.messenger.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]