Group By State name and employee total

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Mar 31 02:42:17 CDT 2008


On 3/31/08 6:25 AM, "barry at noodlebox.com.au" <barry at noodlebox.com.au> wrote:

Hi Barry,

> How do you Group by State when counting employees?
> 
> Select ???(StateName), count(*) from tblEmployee Group by State
> 
> I want to see something like
> 
> Texas 73
> California 1090

Yes, your query looks fine

Possible actually 2 cases:


SELECT StateName, COUNT(*)
FROM tblEmployee 
Group BY State

Or 

SELECT StateName, COUNT(fld)
FROM tblEmployee 
Group BY State


They differ in counting of NULL values.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list