Re: COUNT Problem

2004-10-18 Thread Frederic Wenzel
> >A subselect may help: > >[...] > >Don't know ATM if it can be done more easily, but a query like this > >should probably work. > > > It can be done without a sub-query: > [...] > > That *should* work, barring any typos or ommisions I may have made. I > used LEFT JOIN because of personal prefere

RE: COUNT Problem

2004-10-17 Thread Jose Miguel Pérez
Hi Shaun! I beg you pardon, my last message was incomplete! I will quote the last lines from my previous post: ---8<- Cut here ---8<--- > > - Thanks to the LIMIT clause, we get only the first result, which by > the way is one of the projects with the most assigned tasks.

Re: COUNT Problem

2004-10-17 Thread Chris
Frederic Wenzel wrote: On Sun, 17 Oct 2004 19:36:34 +, shaun thornburgh <[EMAIL PROTECTED]> wrote: A Project will have 1 or more tasks assigned to it. Using the following query, how can I modify it so that I can find out the largest number of tasks assigned to a group of projects. SELECT P.*

RE: COUNT Problem

2004-10-17 Thread Jose Miguel Pérez
Hi Shaun! > A Project will have 1 or more tasks assigned to it. Using the > following > query, how can I modify it so that I can find out the largest > number of > tasks assigned to a group of projects. > > SELECT P.*, T.* > FROM Projects P, Tasks T > WHERE P.Project_ID = T.Project_ID > AND P

Re: COUNT Problem

2004-10-17 Thread Frederic Wenzel
On Sun, 17 Oct 2004 19:36:34 +, shaun thornburgh <[EMAIL PROTECTED]> wrote: > A Project will have 1 or more tasks assigned to it. Using the following > query, how can I modify it so that I can find out the largest number of > tasks assigned to a group of projects. > > SELECT P.*, T.* > FROM Pr

Re: COUNT Problem

2004-10-17 Thread Merlin, the Mage
Hi, Tihs looks to me as too few information. What is in your tables (the information)? What does the query return (a empty set)? Maybe 'cause in your where clause where you have Project_ID >2 you should have Project_ID=2? Or you have several projects with ID>2 and you want tasks for all of