Ok, i have figured it out...
SELECT COUNT(DISTINCT name) from tester WHERE team = 'support'
But this doesnt work on my development box which runs an older version of
mysql! Does anybody know how to get this type of functionality without the
DISTINCT keyword inside count?
:o)
Jamie.
----- Original Message -----
From: "Lezz Giles" <[EMAIL PROTECTED]>
To: "Jamie Burns" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, September 14, 2001 2:29 PM
Subject: Re: surely an easy quick one
> I haven't tested this; I'm not an SQL guru. I just
> like a challenge :-)
>
> SELECT COUNT(*) FROM table WHERE team = "support" GROUP BY name;
>
> Lezz Giles
>
> ----- Original Message -----
> From: "Jamie Burns" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, September 14, 2001 9:08 AM
> Subject: surely an easy quick one
>
>
> > Hello again :o)
> >
> > This is surely an easy quick one but my brain wont work!
> >
> > I have a table (ref, name, team, seminar_ref) like:
> >
> > 1 bill support 100
> > 2 bill support 101
> > 3 bill support 102
> > 4 ben development 201
> > 5 ben development 103
> > 6 ben development 204
> > 7 bob support 104
> > 8 bob support 102
> > 9 bob support 107
> > 7 pat support 102
> > 8 pat support 202
> > 9 pat support 105
> >
> > I need to get a count of how many individual people are in the table,
that
> > belong to a certain group. So if I wanted to find all individual people
in
> > support the answer in this case it would be 3 (bill, bob and pat). I
dont
> > need their names, just the count.
> >
> > Thanks,
> >
> > Jamie.
> >
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> > http://www.mysql.com/manual.php (the manual)
> > http://lists.mysql.com/ (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
> >
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php