Question

A company maintains data on their employees in a table called employee. Write a query to find the the highest paid employee i1 2 * Enter your query below. Please append a semicolon ; at the end of the query */ олд


A company maintains data on their employees in a table called employee. Write a query to find the highest paid employee in each department. The output should contain department_name, employee_name, and salary. Exclude employees with no department from your result.


 Input Format: 

employee table: 

Column Type 

employee_no Integer 

employee_name String 

department_no Integer 

salary Integer 

manager_no Integer 


department table: 

Column Type 

department_no String 

department_name String


0 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1

Answer:

Select d.department_name,e.employee_name,e.salary from employee e JOIN department d ON e.department_no = d.department_no GROUP BY d.department_no having e.salary = MAX(e.salary);

Add a comment
Answer #2
[REMOVED]
Add a comment
Know the answer?
Add Answer to:
A company maintains data on their employees in a table called employee. Write a query to find the highest paid employee in each department. The output should contain department_name, employee_name, and salary. Exclude employees with no department from you
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT