Question
Which SQL query would return the top three departments
with the highest total salaries from an employees table with columns department , salary , and employee_id ?Solution
Explanation: The correct query uses SQL’s GROUP BY to aggregate data by department , calculates the sum of salary for each department using SUM(salary) , and orders the results in descending order with ORDER BY . Finally, the LIMIT 3 clause retrieves only the top three departments. This approach is efficient and aligns with database query standards, ensuring the highest salaries are calculated accurately and in rank order. Option B: MAX(salary) cannot be used without a GROUP BY clause for the entire table, and the syntax is incorrect. Option C: COUNT(salary) measures frequency, not total salary. Option D: DISTINCT eliminates duplicates but does not aggregate data for rankings. Option E: MAX(salary) sorts by individual highest salaries, not aggregated totals, leading to incorrect results.
A) Duress                B) Edict                   C) Volition       D) Callous
...A person who exercises power in a cruel way
In each of the following questions, three out of four words given have the same meaning. Mark the number as your answer which is different in meaning ...
A) demure B) criticize C) shy D) vandalize
...- Select the most appropriate synonym of the given word.
Ponder What is the plural form of the word "child"?
Revel
Choose the option with the correct spelling.Â
Select the most appropriate ANTONYM of the bold word.
The new Principal of the school is stern , yet he understands the needs of his subordinates...
There was a feud between brothers due to dispute regarding their ancestral property