title: How to compare the records in SQL and remove the duplicate entries
body: <p>I am working on a project Extracting data from excel to database (with help of MS BI tools)   </p>
  
  <p>It's just sample it would be help me lot if achieved though SQL queries </p>
  
  <p>I have small questions which are Tools you will be recommend for me </p>
  
  <p>Microsoft SQL Server Analysis Services, SSAS Might be helpful for achieve in this task, since I will be working on major Data Analysis in future  </p>
  
  <p>or Just sql queries would sufficient!</p>
  
  <pre><code> SELECT  [bl]
            ,[m]
            ,[sp]
            ,[ba]
            ,[p]
            ,[b]
            ,[Do]
            ,[Li]
  
        FROM [test].[dbo].[simpletable]
        group by [m],[s] ,[b]
            ,[p]
            ,[b]
            ,[D]
            ,[L]
  </code></pre>
  
  <p>error</p>
  
  <pre><code>Msg 8120, Level 16, State 1, Line 2
  Column 'test.dbo.simpletable.block' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
  </code></pre>