Friday, August 26, 2011

How to find the total amount of a Customers Sales By using Sql Query ?

How to find total amount in Sales Table of One Customer in sql query ?

Select C.CustomerId,C.CustomerName, sum(S.Amount) as Total  From Customers C,Sales S
where C.CustomerId=S.CustomerId
group by C.CustomerId,C.CustomerName

Thursday, August 18, 2011

How to Find Duplicate Records in SqlServer Table

1.How to Find Duplicate Records in Table ?

Select ColumnName From TableName
group by ColumName
having count(ColumName)>1
order by ColumName

Blog Archive

Don't Copy

Protected by Copyscape Online Plagiarism Checker

Pages