Try: select task, resource, department, max(priority) from table group by task, resource, department
Regards, Ulises -----Mensaje original----- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviado el: Jueves 24 de Julio de 2003 02:53 PM Para: [EMAIL PROTECTED] Asunto: SQL Help... After some searching around different books/manuals/google I still can't seem to figure out how do to this. What I have is a table with 4 cols (task, resource, department, priority) and what I want to do is be able to select distinct resources and list what their highest priority is. In other words, if a resource is in a high priority task and a low priority task, I only want to show the high priority task. Thanks for the help! -Nick -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]