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.
- Every transfer of immovable property made with intent to defeat or delay the creditors of the transferor shall be: 
- Disqualification on grounds of defection is provided under which Schedule of the Constitution of India? 
- Which of the following court can try summarily offences mentioned in Sec. 260 of Cr. PC ? 
- The Maharashtra Rent Control Act came into effect in the year? 
- When under section 161 of the code of criminal procedure is statement recorded by the Police? 
- A person acquiring property shall be deemed to have notice of charge from _______________________ 
- An application for succession certificate shall be made to? 
- What is the maximum amount of interim compensation that can be granted by the Court under Negotiable Instruments Act? 
- Which authority appoints the Member-Secretary of the State Legal Services Authority as per the Legal Service Authorities Act 
- Which Islamic legal school requires the presence of two witnesses for a marriage contract to be considered valid?