Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

List the first name and department an employee works for and how much less that employee makes than the highest paid employee in that company

List the first name and department an employee works for and how much less that employee makes than the highest paid employee in that company Three columns Third column should be subquery Hint: use MAX clause and do subtraction

create table employees ( employee_id INT, first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(50), hire_date DATE, department VARCHAR(17), gender VARCHAR(1), salary INT, region_id INT, primary key (employee_id) ); insert into employees values (1, 'Berrie', 'Manueau', 'bmanueau0@dion.ne.jp', '2006-04-20', 'Sports', 'F', 154864, 4); insert into employees values (2, 'Aeriell', 'McNee', 'amcnee1@google.es', '2009-01-26', 'Tools', 'F', 56752, 3); insert into employees values (3, 'Sydney', 'Symonds', 'ssymonds2@hhs.gov', '2010-05-17', 'Clothing', 'F', 95313, 4); insert into employees values (4, 'Avrom', 'Rowantree', null, '2014-08-02', 'Phones & Tablets', 'M', 119674, 7);

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_2

Step: 3

blur-text-image_3

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

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

Students also viewed these Databases questions

Question

During deposition, what posture should an expert witness display?

Answered: 1 week ago

Question

Summarize training and development implementation issues.

Answered: 1 week ago

Question

Define Administration and Management

Answered: 1 week ago