Homework 4
Homework 4
HOMEWORK: WEEK 4
Run the following queries in HTML DB. Paste a copy of each query on a word
document or notepad .txt file, save and return via email:
1. Write a query that displays the last_name and email addresses for all people in the DJ
on Demand D_CLIENT table. The column headings should appear as Client and
Email Address.
2. The manager of Global Fast Foods decided to give all employees at 5% / hour raise + a
$ .50 bonus / hour. However, when he looked at the results, he couldnt figure out why
the new raises were not as he predicted. Ms. Doe should have a new salary of $7.59,
Mr. Millers salary should be $11.00 and Ms. Monique Tuttle salary should be $63.50.
He used the following query. What should he have done?
SELECT last_name, salary*.05 + .50
FROM f_staffs;
3. The manager of Global Fast Foods would like to send out coupons for upcoming sale.
He wants to send one coupon to each household. Create the SELECT statement that
return the customer last name and a mailing address.
4. Sue, Bob and Monique were the employees of a month. Using the F_STAFFS table,
create a SELECT statement to display the results as shown in the super Star chart.
Super Star
***Sue***Sue***
***Bob***Bob***
***Monique***Monique***
5. Global Fast Foods has decide to give all staff members a 5% raise. Prepare a report that
presents the output as shown in the chart.
EMPLOYEE LAST NAME
CURRENT SALARY
6. The owners of DJs on Demand would like a report of all in their D_CDs table. With the
following headings: Iventory Item, CD Title, Music Producer, Year Purchased. Prepare
this report.
7. Using the Global Fast Foods database, retrieve the customers first name, last name and
address for the customer who uses ID 456.
8. Show the name, start date and end date for Global Fast Foods promotional item
ballpen and highlighter giveaway.
9. The manager of DJ on Demand would like a report of all the CD titles and years of CDs
that were produced before 2000.
10. Write a SQL statement that will display the student number (studentno) of any student
who has a PE major in the table named STUDENTS. Title the studentno column
Student Number.
1
Copyright 2005, Oracle. All rights reserved
2
Copyright 2005, Oracle. All rights reserved