Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ROOKIE needs HELP !

Re: ROOKIE needs HELP !

From: Allen Kirby <akirby_at_att.com>
Date: 1997/01/17
Message-ID: <32DF86D1.308C@att.com>#1/1

Since you were honest and said this was homework, I'll give you some hints, but I can't write it for you!

C. & K. Rozema wrote:

> The questions I'd like to answer are:
>
> 1)
> How many people got hired in the year in which the most people got hired,
> and how many people did get hired in that year?

Use the to_char(hiredate,'yy') function to extract the year from the hiredate. You'll need to do two queries - one to get the year with most hires, then use that value in another query and count the rows. (Does the term 'subquery' mean anything to you?)
> 2)
> Give the empno's of the managers (job = ' MANAGER ' ) with an empno larger
> than 7777, who have several subordinate's/inferiors/employees with the same
> job.
>
> Please help this Rookie to answer the last 2 answers of his 'homework'.

With this one you'll have to join the table back to itself using empno and
mgr to find out how many employees who are MANAGERs have more than one employee who lists them as their mgr. Gee, this sounds like a test on SUBQUERIES (hint, hint).

Sorry, that's all you're gonna get. Get the book out and good luck!

-- 
---
Allen Kirby			AT&T ITS Production Services
akirby_at_att.com			Alpharetta, GA.
Received on Fri Jan 17 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US