Help with simple querry please!

Giganews Newsgroups
Subject: Help with simple querry please!
Posted by:  Clownfish (clownfish…@yahoo.com)
Date: 8 Aug 2006

OK, I'm having a brain freeze.

I have a table like this:

Office  Name  Phone
----------------------------------
SG      Larry    555-1212
SG      Moe      553-4444
SG      Curly    666-8888
PO      Ren      222-9999
PO      Stimpy  555-8888

and I want to a querry that produces this:

Office  Name  Phone        OfficeCount
----------------------------------------------------------
SG      Larry    555-1212      3
SG      Moe      553-4444      3
SG      Curly    666-8888      3
PO      Ren      222-9999      2
PO      Stimpy  555-8888      2

I try this:

SELECT Office, Name, Phone, Count(Office) AS OfficeCount
FROM Table
GROUP BY Office, Name, Phone

and I get

Office  Name  Phone        OfficeCount
----------------------------------------------------------
SG      Larry    555-1212      1
SG      Moe      553-4444      1
SG      Curly    666-8888      1
PO      Ren      222-9999      1
PO      Stimpy  555-8888      1

What am I missing or doing wrong?

Thanks!

Pete

Replies