Solved

SQL Count function

Posted on 2011-03-15
5
448 Views
Last Modified: 2012-05-11
I need to come up with Syntax to find the number of employees (Employee.Emp_ID) in each classification EEO1_Classification
0
Comment
Question by:Winstink
5 Comments
 
LVL 9

Expert Comment

by:Roman Gherman
ID: 35141286
Hi,
Could you give more details?

---------------
Find me on: http://extremedev.blogspot.com
0
 
LVL 26

Accepted Solution

by:
Shaun Kline earned 250 total points
ID: 35141291
Select EEO1_Classification, count(*)
from Employee
group by EEO1_Classification
0
 
LVL 74

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 250 total points
ID: 35141310
It sounds like you need a GROUP BY:
SELECT EEO1_Classification, COUNT(1) As Count
FROM Employee
GROUP BY EEO1_Classification

Open in new window

0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 35141321
Awww shucks Shaun_Kline....  you beat me to it  = )
0
 
LVL 7

Expert Comment

by:mmr159
ID: 35141569
One gets points for speed, one for form. :)
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now