0

Is a SQL function exists to SUM some numbers in a column but only if they are different ?

Hadi
  • 36,233
  • 13
  • 65
  • 124

2 Answers2

4

You can use subqueries to achive this:

Select Sum(TBL.column) From
( Select distinct column From Table) as TBL
Hadi
  • 36,233
  • 13
  • 65
  • 124
1
SELECT SUM(DISTINCT(COLUMN_NAME)) FROM TABLE