You need to calculate the total of all salaries in the accounting department. Which group function should you use?

  1. MAX

  2. MIN

  3. SUM

  4. COUNT

  5. TOTAL

  6. LARGEST


Correct Option: C
Explanation:

To calculate the total of all salaries in the accounting department, you need to use the SUM function.

Option A (MAX) returns the highest value in a set of values.

Option B (MIN) returns the lowest value in a set of values.

Option C (SUM) is the correct option. It returns the sum of all values in a set of values.

Option D (COUNT) returns the number of values in a set of values.

Option E (TOTAL) is not a valid function in SQL.

Option F (LARGEST) is not a valid function in SQL.

Therefore, the answer is: C. SUM.

Find more quizzes: