I looked at the group by option already and I dont think it will do what I
need it to do. I say this because it will only group things in the
priority/task/whatever but that still leaves options for duplicate
resources. Yes, it would get rid of the dup. resources per priority, but
not for the entire table.
I really want to group by the resource, but still have all the info
available for what ever the highest priority task it is in.

-Nick

Btw, all the fields are varchars with the priorities being Hi, Medium,
Low, but I could really care less on what particular priority it is atm.


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


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

Reply via email to