SELECT SUM(Amount) FROM (SELECT DISTINCT BillNo FROM [TableName]
select SUM(amount) sum from( select distinct billno, amount from bill) as distincted
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)