Thread: Group BY ...(cont.)

Group BY ...(cont.)

From
Antti Linno
Date:
Ok, if I want to use group by, then I have to put every select field
afterwards to group by. But I do want to group by one field.
Hence
select workgroup,id from job group by workgroup,id;
would create groups of 1?
But I want to group by workgroups.
Sorry if my explanation is fuzzy.
A.




Re: Group BY ...(cont.)

From
"tjk@tksoft.com"
Date:
E.g.

select workgroup from job group by workgroup;


will that do?


Troy

>
> Ok, if I want to use group by, then I have to put every select field
> afterwards to group by. But I do want to group by one field.
> Hence
> select workgroup,id from job group by workgroup,id;
> would create groups of 1?
> But I want to group by workgroups.
> Sorry if my explanation is fuzzy.
> A.
>
>
>

Re: Group BY ...(cont.)

From
Jesus Aneiros
Date:
No, you don't you could say:

SELECT workgroup, id
FROM job
GROUP BY workgroups;

On Wed, 5 Jul 2000, Antti Linno wrote:

> Ok, if I want to use group by, then I have to put every select field
> afterwards to group by. But I do want to group by one field.
> Hence
> select workgroup,id from job group by workgroup,id;
> would create groups of 1?
> But I want to group by workgroups.
> Sorry if my explanation is fuzzy.
> A.
> 
>