GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics
Go To First  |  Previous Question  |  Next Question 
 Basics  |  Question 27 of 49    Print  
create a query that will display the total no.of employees and, of that total, the no.of employees hired in 1995,1996,1997, and 1998. create appropriate column headings.

  
Total Answers and Comments: 4 Last Update: November 14, 2008   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: sesindia
 
select * from employees where hiredate =1995,1996,1997,1998;

Above answer was rated as good by the following members:
imran44
September 27, 2006 04:42:47   #1  
mano        

RE: create a query that will display the total no.of e...

Hi

U can use with the help of Decode fn.


 
Is this answer useful? Yes | No
October 04, 2006 06:59:02   #2  
hafeez        

RE: create a query that will display the total no.of e...
select count(*) to_char(hiredate 'yyyy') from emp group by to_char(hiredate 'yyyy')
 
Is this answer useful? Yes | No
August 22, 2007 01:43:36   #3  
dustlove        

RE: create a query that will display the total no.of e...
Like this:
select count(*) count(decode(to_char(hire_date 'yyyy') '1995' 1 null)) y1995
count(decode(to_char(hire_date 'yyyy') '1996' 1 null)) y1996 from co_counter

 
Is this answer useful? Yes | No
November 14, 2008 06:52:27   #4  
sesindia Member Since: November 2008   Contribution: 2    

RE: create a query that will display the total no.of employees and, of that total, the no.of employees hired in 1995,1996,1997, and 1998. create appropriate column headings.
select * from employees where hiredate 1995 1996 1997 1998;
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
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