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.
Solve for x in the equation: 3(x + 2) + 2(2x - 5) = 5x + 9

If x = 19, then the value of x5 - 20x4 + 20x3 - 20x2 + 20x - 1 is
Given a triangle with two sides measuring 12 cm and 16 cm, which of the following cannot be a possible length for the third side?
The mean age of 30 students was calculated as 15 years. However, it was later discovered that one student's age was mistakenly entered as 15 years inste...
In a triangle ABC, a point D lies on AB and points E and F lie on BC such that DF is parallel to AC and DE is parallel to AF. If BE = 4 cm. EF = 6cm. th...
If a = 32, b = c = 31, then find the value of a 3  + b 3  + c 3  – 3abc.
If x3 + y3 = 9 and x + y=3 then the value of x4 + y4 is:
105, 111, 123, 141, ?, 195
Let {x + (1/x)} = 4, then Determine the value of {x² + (1/x²)}