100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

INF3707 - School of Computing (database design and implementation)

Beoordeling
-
Verkocht
-
Pagina's
11
Cijfer
A+
Geüpload op
27-12-2022
Geschreven in
2022/2023

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] 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 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 4200 9000 28800 29-APR-10 AC_MGR 12000 12000 12000 29-APR-10 AC_ACCOUNT 8300 8300 8300 29-APR-10 ST_MAN 5800 8200 36400 29-APR-10 PU_MAN 11000 11000 11000 29-APR-10 AD_ASST 4400 4400 4400 29-APR-10 AD_VP 17000 17000 34000 29-APR-10 SH_CLERK 2500 4200 64300 29-APR-10 FI_ACCOUNT 6900 9000 39600 29-APR-10 FI_MGR 12000 12000 12000 29-APR-10 More than 10 rows available. Increase rows selector to view more rows. Solution select job_id, min(salary) Minimum, max(salary) Maximum, sum(salary) Sum, sysdate “Date” from employees group by job_id

Meer zien Lees minder
Instelling
Vak









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
27 december 2022
Aantal pagina's
11
Geschreven in
2022/2023
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

INF3707/202/1/2010




SCHOOL OF COMPUTING

INF3707




TUTORIAL LETTER 202/1/2010




Contents

1 Study material received...........................................................................................................................1

2 Lecturers responsible for INF3707...........................................................................................................2

3. Assignment 2...........................................................................................................................................2




1 Study material received

You should have received the following tutorial letters
Tutorial letter 101 First Tutorial Letter containing important
administrative information

1|Page

, INF3707/202/1/2010


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


3. 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]
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



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



2|Page
$8.00
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper
Seller avatar
ProfRogers

Maak kennis met de verkoper

Seller avatar
ProfRogers Chamberlain College Of Nursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
0
Lid sinds
3 jaar
Aantal volgers
0
Documenten
0
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen