GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics
Go To First  |  Previous Question  |  Next Question 
 Basics  |  Question 25 of 49    Print  
write a query to display the no.of people with the same job

  
Total Answers and Comments: 6 Last Update: October 29, 2008     Asked by: zecar 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: amikat
 
 select job, count(ename)
 from emp
 group by job;

Above answer was rated as good by the following members:
subajay, Ismail AbulHassan
September 17, 2006 05:01:19   #1  
oradev03 Member Since: September 2006   Contribution: 2    

RE: write a query to display the no.of people with the...

SELECT job COUNT(*) As No of employees

FROM emp

GROUP BY job;


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
December 22, 2006 05:22:25   #2  
Dakshina Murthy        

RE: write a query to display the no.of people with the...

SELECT job COUNT(*)

FROM emp

GROUP BY job;


 
Is this answer useful? Yes | No
June 03, 2008 14:12:53   #3  
amikat Member Since: June 2008   Contribution: 5    

RE: write a query to display the no.of people with the same job
select job count(ename)
from emp
group by job;

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 04, 2008 00:07:00   #4  
sravee123 Member Since: May 2008   Contribution: 24    

RE: write a query to display the no.of people with the same job
SELECT job COUNT(*)

FROM emp

GROUP BY job;


 
Is this answer useful? Yes | No
September 12, 2008 02:18:10   #5  
lanka_satya Member Since: January 2008   Contribution: 16    

RE: write a query to display the no.of people with the same job
select count(name) from emp e where 1>(select count(*) from emp x where x.job e.job)
 
Is this answer useful? Yes | No
October 29, 2008 09:43:47   #6  
POPAM143 Member Since: May 2008   Contribution: 1    

RE: write a query to display the no.of people with the same job
SELECT job count(*) AS no.ofemployee FROM emp GROUP BY job;
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape