MCQs > IT & Programming > Microsoft SQL Server > You have a table 'engineers' with the following table structure: enggid int(4) deptname varchar(50) salary int(4) You want to display the minimum and maximum salaries of the individual departments. Which of the following queries will fetch the desired results?

Microsoft SQL Server MCQs



You have a table "engineers" with the following table structure:

enggid                int(4)

deptname            varchar(50)

salary                int(4)

You want to display the minimum and maximum salaries of the individual departments. Which of the following queries will fetch the desired results?

Answer

Correct Answer: select deptname, min(salary) as Minimum, max(salary) as Maximum from engineers group by deptname

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Microsoft SQL Server Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Microsoft SQL Server Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it