Question:

If column "Payment" contains the data set \{10000, 15000, 25000, 10000, 15000\}, what will be the output after the execution of the given query? \[ \text{SELECT SUM(DISTINCT PAYMENT) FROM EMPLOYEE;} \]

Show Hint

The "DISTINCT" keyword in SQL ensures that only unique values are considered in aggregate functions like SUM.
Updated On: Apr 24, 2025
  • 75000
  • 25000
  • 10000
  • 50000
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

The query uses the "DISTINCT" keyword, which means it will sum the unique values from the "Payment" column. The unique payments are: 10000, 15000, and 25000. Therefore, the sum is: \[ 10000 + 15000 + 25000 = 50000 \] Thus, the output will be 50000.
Was this answer helpful?
0
0