Hi, does any1 have Oracle answers to these q’s? Thanks!?
Question by misty111: Hi, does any1 have Oracle answers to these q’s? Thanks!?
12.Using a WITH clause write a SELECT statement to list the job_title of those jobs whose maximum salary is more than half the maximum salary of the entire company. Name your subquery MAX_CALC_SAL. Name the columns in the result JOB_TITLE and JOB_TOTAL, and sort the result on JOB_TOTAL in descending order. Hint: Examine the jobs table. You will need to join JOBS and EMPLOYEES to display the job_title.
13.Write one query to return the employee_id, job_id, hire_date and department_id of all employees and a second query listing employee_id, job_id, start_date and department_id from the job_hist table and combine the results as one single output. Make sure you suppress duplicates in the output.
14.DJs on Demand just purchased four new CDs. Use an explicit INSERT statement to add each CD to the copy_d_cds table. After completing the entries, execute a SELECT * statement to verify your work.
CD_NUMBERTITLEPRODUCERYEAR
97Celebrate the DayR&B Inc.2003
98Holiday Tunes for All AgesTunes are Us
2004
99Party MusicOld Town Records2004
100Best of Rock and RollOld Town Records2004
15.DJs on Demand has two new events coming up. One event is a fall football party and the other event is a sixties theme party. The DJs on Demand clients requested the songs shown in the table for their events. Add these songs to the copy_d_songs table using an implicit INSERT statement.
IDTITLEDURATIONTYPE_CODE
52Surfing Summer Not known12
53Victory Victory5 MINS
12
16.Monique Tuttle, the manager of Global Fast Foods, sent a memo requesting an immediate change in prices. The price for a strawberry shake will be raised from $ 3.59 to $ 3.75, and the price for fries will increase to $ 1.20. Make these changes to the copy_f_food_items table.
17.Add the new customers shown below to the copy_f_customers table. You may already have added Katie Hernandez. Will you be able to add all these records successfully?
ID FIRST_
NAME LAST_
NAME ADDRESS CITY STATE ZIP PHONE_NUMBER
145 Katie Hernandez 92 Chico Way Los Angeles CA 98008 8586667641
225 Daniel Spode 1923 Silverado Denver CO 80219 7193343523
230 230 Adam Zurn 5 Admiral Way Seattle WA 4258879009
18.Sue Doe has been an outstanding Global Foods staff member and has been given a salary raise. She will now be paid the same as Bob Miller. Update her record in copy_f_staffs.
19.When would you want a DEFAULT value?
20.Complete the GRADUATE CANDIDATE table instance chart. Credits is a foreign key column referencing the requirements table.
21.Write the syntax to create the grad_candidates table. Confirm creation of the table using DESCRIBE.
Column
Name
student_idlast_namefirst_namecreditsgraduation_date
Key Type
Nulls/Unique
FK Column
DatatypeNUMBERVARCHAR2VARCHAR2NUMBERDATE
Length63
22.In your o_employees table, enter a new column called “Termination.” The datatype for the new column should be VARCHAR2. Set the DEFAULT for this column as SYSDATE to appear as character data in the format: February 20th, 2003.
23.Create a new column in the o_employees table called start_date. Use the TIMESTAMP WITH LOCAL TIME ZONE as the datatype.
24.Using the column information for the animals table below, name constraints where applicable at the table level, otherwise name them at the column level. Define the primary key (animal_id). The license_tag_number must be unique. The admit_date and vaccination_date columns cannot contain null values.
animal_id NUMBER(6)
name VARCHAR2(25)
license_tag_number NUMBER(10)
admit_date DATE
adoption_id NUMBER(5),
vaccination_date DATE
25.Create the animals table. Write the syntax you will use to create the table.
Best answer:
Answer by qbdeal1
the answer is 2
Know better? Leave your own answer in the comments!