Solved

SQL Count function

Posted on 2011-03-15
5
449 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 75

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 75

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

932 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

10 Experts available now in Live!

Get 1:1 Help Now