473,498 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Oracle

2 New Member
create a query that will display the total number of employees and, of that total, the number of employees hired in 1995,1996,1997 and 1998. Create apprppriate column headings.
Jul 18 '07 #1
3 2605
prakash331
5 New Member
create a query that will display the total number of employees and, of that total, the number of employees hired in 1995,1996,1997 and 1998. Create apprppriate column headings.

select
select count(*) from emp where hire_date between to_date('01-01-1995',dd-mm-yyyy) and to_date('31-12-1995',dd-mm-yyyy) "Employees Hired in 1995",
select count(*) from emp where hire_date between to_date('01-01-1996',dd-mm-yyyy) and to_date('31-12-1996',dd-mm-yyyy) "Employees Hired in 1996",
select count(*) from emp where hire_date between to_date('01-01-1997',dd-mm-yyyy) and to_date('31-12-1997',dd-mm-yyyy) "Employees Hired in 1997",
select count(*) from emp where hire_date between to_date('01-01-1998',dd-mm-yyyy) and to_date('31-12-1998',dd-mm-yyyy) "Employees Hired in 1998",
Select count(*) from emp "Total Number Of Employees" from emp;
Jul 19 '07 #2
geethika81
1 New Member
create a query that will display the total number of employees and, of that total, the number of employees hired in 1995,1996,1997 and 1998. Create apprppriate column headings.

Tey this
select distinct
(select count(*) from emp where hiredate like '%95') "1995"
,(select count(*) from emp where hiredate like '%96') "1996"
,(select count(*) from emp where hiredate like '%97') "1997"
,(select count(*) from emp where hiredate like '%98') "1998"
,(select count(*) from emp) "total"
from emp
group by hiredate;
Oct 10 '07 #3
debasisdas
8,127 Recognized Expert Expert
create a query that will display the total number of employees and, of that total, the number of employees hired in 1995,1996,1997 and 1998. Create apprppriate column headings.
Kindly post what you have tried so far.

We are not here to do your homework.
Oct 11 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
5198
by: Jan Bols | last post by:
I've been trying to install Oracle 8.1.7 on a fresh Mandrake 9.1 O.S for days, but I'm still not able to get it running. I've tried several install instructions that I found on the internet but no...
4
19966
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
63
25519
by: Nick Palmer | last post by:
Hi all, Is there a DB2 equivilant to Oracle's DB Link functionality ? I have two DB2 databases and I need to get access to the tables in one from the other. In Oracle I would just create a DB...
3
23423
by: Jon Ole Hedne | last post by:
My Access 2002-application need to work with tables from both Oracle and Access. To solve this, I want to run some querys on three views in Oracle and import the results into temporary...
13
7450
by: Chris Botha | last post by:
The machine is running XP Pro with all the latest service packs, etc. I must access an Oracle database so I installed the Oracle client stuff. I can query Oracle from a Windows app, no problem....
2
14203
by: Vinod Sadanandan | last post by:
All, Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features . Precompilers:...
2
3543
by: Ruslan A Dautkhanov | last post by:
Hello ! I'm about to install O9i on FreeBSD box. uname -a: FreeBSD stat2.scn.ru 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #2: Fri Apr 23 19:19:43 KRAST 2004...
0
3282
by: Jack | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
3264
by: Winder | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
4592
by: sathyguy | last post by:
when i type the below in my RHEL AS 4's Firefox 1.5 http://appsworld.ncc.com:7777/forms/...&form=test.fmx iam getting the below error... The requested URL /forms/frmservlet was not found on...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7167
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7208
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3095
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
657
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.