title: SQL Server Data Without Duplicates items
body: <p>Is there any possible way/Query in SQL Server in which I can fetch column values except duplicates. Below is the Example</p>
  
  <pre><code>id | device_id | company_id  |  
  1       1           4         
  2       1           4      
  3       2           4
  4       3           4
  </code></pre>
  
  <p>From above table I only want data of columns whose device_id is not duplicate i.e  device_id =2 and 3 . I know about distict but by using distinct I get one value of duplicate also , but I only want result without duplicates .
  Hope I am able to explain my problem .
  TIA
    . </p>