-->-----Original Message-----
-->From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
-->Sent: Thursday, July 24, 2003 12:53 PM
-->To: [EMAIL PROTECTED]
-->Subject: 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.

Take a look at GROUP BY HAVING and Count(*) at mysql.com
Something like
SELECT resource, task, priority GROUP BY priority, task having priority
> <what you define as task>

I have no idea what your column types are and what data is contained so
please excuse this guess.



-->
-->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]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to