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.
An entrepreneur considering if what they are doing makes sense is an example of:
What is the term used to describe the process of discontinuing a product, service, or business unit due to low profitability or market demand?
What is the term used to describe the process of scaling up a startup into a sustainable and profitable business?
What is the term used to describe the process of acquiring or merging with another company to achieve growth or strategic objectives?
Which of the following are good sources of new business ideas?
Which of the following is NOT a type of innovation?
What does the term "bootstrapping" mean in the context of entrepreneurship?
Which Indian government scheme aims to provide credit facilities to small and microenterprises in the manufacturing and service sectors?
As defined by the Mc Kinsey group which of the following is not a key characteristic of Innovation?
Which Indian government initiative focuses on supporting startups with funding, mentorship, and other resources?