Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7729889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:05:01+00:00 2026-06-01T06:05:01+00:00

This is the last question for my Oracle homework for the year and I

  • 0

This is the last question for my Oracle homework for the year and I cannot figure out even where to start..must be a bad brain day.

Can someone help me with this?

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.

Thanks!

This is what I have so far…

WITH MAX_CALC_SAL  AS (
    SELECT e.salary, SUM(e.salary) AS tot_salary
    FROM   employees e JOIN jobs j
    ON     e.job_id = j.job_title
    GROUP BY j.job_title
),
avg_cost AS (
    SELECT SUM(e.salary)/COUNT(*) AS avg_salary
    FROM   e.employee
)
SELECT * 
FROM   e.employee 
WHERE  avg_salary > (SELECT max_salary / 2 
                     FROM j.jobs)
ORDER BY job_total
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:05:02+00:00Added an answer on June 1, 2026 at 6:05 am

    Are you looking for something like:

    WITH max_calc_sal
      AS (SELECT job_id,
                 j.job_title,
                 MAX(e.salary) AS job_total
            FROM jobs j
           INNER JOIN employees e
           USING (job_id)
           GROUP BY job_id,
                    j.job_title)
    SELECT job_title,
           job_total
      FROM max_calc_sal
     WHERE job_total > (0.5 * SELECT MAX(job_total)
                                FROM max_calc_sal)
     ORDER BY job_total DESC;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this post is off the back of my last question (thought i'd start a
This is why I'm asking this question: Last year I made some C++ code
Last question for this day. I'm trying to find a way to parse the
My last question was somewhat narrower than this one. I am interested to know
this follows on from my last question which I thought was answered but for
this is some kind of followup to my last question. i needed to find
This is a followup to my last question . I now have a byte[]
I guess this is a continuation of the last question I asked: bulk insert
This is all I need to finish answering my last question . If you
I'm losing my mind on this one. My last question answered a syntax issue,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.