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.
Who among the following can join the National Pension System (NPS)?
Consider the following items in the two tables and choose the Correct Option.
The Paris Agreement is a legally binding international treaty on climate change whose overarching goal is to hold the increase in the global average t...
With reference to the âProhibition of Benami Property Transactions Act, 1988 (PBPT Act)â, consider the following statements:
1. A property tr...
When was the Asian Development Bank founded ?Â
The term National Income represents:Â
Regarding âAtal Pension Yojanaâ, which of the following statements is/are correct?
1. It is a minimum guaranteed pension scheme mainly target...
Consider the following statements about National Housing Bank (NHB):
       I.           It was set up by an Act of Parliamen...
With reference to Indian economy, consider the followingâ
1. Bank rate
2. Open market operations
3. Public debt
4. Public ...
Open - market operations of Reserve Bank of India refer to;