• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 11 pages
Exam (elaborations)

INF3707-Database Design And Implementation Assignment 2.

Document preview thumbnail
Preview 2 out of 11 pages

INF3707-Database Design And Implementation Assignment 2. Assignment 2 Question 1 (Lesson 4) a. The Human Resources department needs a report that displays the job ID and the average monthly salary for each job that has an average payroll that is between 5000 and 10000. The report should not include clerks. Sort the list in descending order of average salary. Sample results are shown below. Save your query as Q1A.SQL. [6] Solution select job_id, avg(salary)"Average salary" from employees where job_id not like '%CLER%' group by job_id having avg(salary) between 5000 and 10000 order by avg(salary)desc b. Create a query that displays the minimum, maximum, and total salary for each job type and the date the query was run. Sample results are shown below. Save your query as Q1B.SQl. [4] JOB_ID MINIMUM MAXIMUM SUM Date IT_PROG -APR-10 AC_MGR -APR-10 AC_ACCOUNT -APR-10 ST_MAN -APR-10 PU_MAN -APR-10 AD_ASST -APR-10 AD_VP -APR-10 SH_CLERK -APR-10 FI_ACCOUNT -APR-10 FI_MGR -APR-10 More than 10 rows available. Increase rows selector to view more rows. JOB_ID Average Salary IT_PROG 5760 MK_REP 6000 HR_REP 6500 ST_MAN 7280 FI_ACCOUNT 7920 AC_ACCOUNT 8300 SA_REP 8350 PR_REP 10000 INF3707/202/1/2010 4 | Page Solution select job_id, min(salary) Minimum, max(salary) Maximum, sum(salary) Sum, sysdate “Date” from employees group by job_id Question 2 (Lesson 6) The human Resources department needs to find the names and hire dates for all employees who were hired before 29 January 2000, along with their managers’ names. Sample results are shown in the table below. Save your query as Q2A.SQL. [6] Worker Name Hire Date Manager Name Kochhar 21-SEP-89 King De Haan 13-JAN-93 King Hunold 03-JAN-90 De Haan Ernst 21-MAY-91 Hunold Austin 25-JUN-97 Hunold Pataballa 05-FEB-98 Hunold Lorentz 07-FEB-99 Hunold Greenberg 17-AUG-94 Kochhar Faviet 16-AUG-94 Greenberg Chen 28-SEP-97 Greenberg More than 10 rows available. Increase rows selector to view more rows Solution select _name "Worker Name", _date "Hire Date", _name "Manager Name" from employees w join employees m on er_id = yee_id where _date = '29-JAN-2000'

Content preview

INF3707/202/1/2010




SCHOOL OF COMPUTING



INF3707




TUTORIAL LETTER 202/1/2010




1|Page

, INF3707/202/1/2010



Contents

1 Study material received......................................................................................................................... 2
2 Lecturers responsible for INF3707 ....................................................................................................... 2
3. Assignment 2 ........................................................................................................................................ 3




1 Study material received

You should have received the following tutorial letters

Tutorial letter 101 First Tutorial Letter containing important
administrative information
Tutorial Letter 102 Second tutorial letter containing oracle
installation instructions, assignment 1 & 2
Tutorial Letter 201 Solutions to assignment 1
Tutorial Letter 202(This one) Solution to assignment 2


If you are missing any study material, please contact the UNISA Contact Centre at (+27 861 670 411
for RSA calls only or +27 11 670 9000 for international calls) or download it from the myUnisa
website at http://my.unisa.ac.za. Do not contact us for missing or lost study material since we are
unable to assist you with any missing or lost study material.


2 Lecturers responsible for INF3707

The lecturers are Mr Baldreck Chipangura and Dr E Kritzinger.

Please phone us on +27 12 429 6376 or send e‐mails to




2|Page

Document information

Uploaded on
August 16, 2022
Number of pages
11
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers
$3.10

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
EXCELLENTNURSE
3.9
(169)
Sold
1216
Followers
989
Items
5419
Last sold
3 weeks ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions