Help for a student please
From: Karen Standish <standish_at_kc.rr.com>
Date: Sun, 19 Mar 2000 21:47:55 GMT
Message-ID: <fWbB4.438$4V.42707_at_typhoon2.kc.rr.com>
Good Evening and HELP PLEASE,
[Quoted] [Quoted] I am stumped on one of my class questions. Currently taking a class for SQL [Quoted] in oracle. The question is:
Date: Sun, 19 Mar 2000 21:47:55 GMT
Message-ID: <fWbB4.438$4V.42707_at_typhoon2.kc.rr.com>
Good Evening and HELP PLEASE,
[Quoted] [Quoted] I am stumped on one of my class questions. Currently taking a class for SQL [Quoted] in oracle. The question is:
[Quoted] create a query that will display the total number of employees and of that total the number who were hired in 1980, 1981, 1982, and 1983, label the columns appropriately.
The query should look like this.
Total 1980 1981 1982 1983
_____ ____ ____ ____ ____
14 1 10 2 1
I know this is not correct but I am just absolutely blocked.
SELECT COUNT(*) AS TOTAL
,if
,count(TO_CHAR(HIREDATE,'YYYY')) "1980"
,count(TO_CHAR(HIREDATE,'YYYY')) "1981"
,count(TO_CHAR(HIREDATE,'YYYY')) "1982"
,count(TO_CHAR(HIREDATE,'YYYY')) "1987"
FROM emp
group by to_char(hiredate,'yyyy')
/
-- Karen Standish standish_at_kc.rr.comReceived on Sun Mar 19 2000 - 22:47:55 CET