Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Count function

Posted on 2011-03-15
5
Medium Priority
?
459 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 27

Accepted Solution

by:
Shaun Kline earned 1000 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 1000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

610 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