Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need a help on understanding this sql problems. Question 7 Use the tables in your schema. Alter the previous query to print out the average

need a help on understanding this sql problems. image text in transcribed
image text in transcribed
image text in transcribed
Question 7 Use the tables in your schema. Alter the previous query to print out the average salary for all departments, showing the department name. (Hint: use the "group by" clause - see p121 of text). Order the output by lowest to highest average salary (Hint: use the column alias). Write this using SQL/92 with USING. Include a report header of "Average Salaries Per Department". Clear the title after running the report so it doesn't appear in the next query. **/ Question 8 Use the tables in your schema. Alter the previous query to only print out those departments that have an average salary greater than 10,000. This time order the results in based on average salary in descending sequence. Question 9 use the tables in your schema. For each job, display the job title followed by the number of employees with that job title, then the min, max, and avg salary for that job. Format the results to display in dollars with no decimal places. Set the column headers to be NUM, MIN, Max and AVERAGE and a report title of "Salaries Per Job". use SQL/92 - Implement with USING statement. Hint: you will need to use a "group by" clause. Keep the ordering by ascending average salary. Clear the report header at the end. Question 10 use the tables in your schema. Alter the previous query to only print out those job titles that have more than 1 employee for the job title. Question 11 use the tables in your schema. Show the last name, hire date, and use a case statement to form a third column labeled "experience" If the employee was hired before 1990, they are an old Timer, before 1994 Senior, before 1997 Experienced, before 1999 Ounior and everyone else is a "Rookie'. Only show employees whose name begins with 8. (protect against case anomalies). Order by ascending last name HR DEPARTMENTS department_id department name manager_id location id JOB_HISTORY employee_id start date end date job_id department_id LOCATIONS location_id street_address postal_code city state_province country_id JOBS job id job_title EMPLOYEES employee_id first name last_name email phone_number hire_date job_id salary commission pct manager_id department_id COUNTRIES country_id country_name region_id min_salary max_salary REGIONS region_id region_name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions