I am trying for a select statement in SQL Server 2005. I have columns “IsConfirmed” and “Amount”.
My aim is to get Sum of all Amounts for each day along with a boolean value which should be calculated. If there is 0 as IsConfirmed, get the value of Isconfirmed for that day as 0 or if all records on that day are 1, give me 1. Is there a way for this kind of a solution in sql. Thank you in Advance..
Select sum(Amount) from RepAmount
where ComID = 1234
group by RD.Date
1 Answer