GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics
Go To First  |  Previous Question  |  Next Question 
 Basics  |  Question 27 of 47    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

No best answer available. Please pick the good answer available or submit your answer.
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 | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape