title: Group duplicate records in SQL Server where some field = 0
body: <p>I have a table:</p>
  
  <pre><code>| LastName | FirstName | Title                | isdefault |
  +----------+-----------+----------------------+-----------+
  | Davolio  | Nancy     | Sales Representative | 1         |
  | Fuller   | Andrew    | Vice President, Sales| 1         |
  | Fuller   | Andrew    | Vice President, Sales| 0         |
  | Fuller   | Andrew    | Vice President, Sales| 0         |
  | Leverling| Janet     | Sales Representative | 0         |
  | Leverling| Janet     | Sales Representative | 0         |
  | Leverling| Janet     | Sales Representative | 0         |
  </code></pre>
  
  <p>in a SQL Server database.</p>
  
  <p>My query is: </p>
  
  <pre><code>SELECT 
      LastName, FirstName, Title, isdefault 
  FROM 
      Employees
  </code></pre>
  
  <p>I wish to select equal records, where <code>isdefault = 0</code>. So my new output should be:</p>
  
  <pre><code>| LastName | FirstName | Title                | isdefault |
  +----------+-----------+----------------------+-----------+
  | Leverling| Janet     | Sales Representative | 0         |
  | Leverling| Janet     | Sales Representative | 0         |
  | Leverling| Janet     | Sales Representative | 0         |
  </code></pre>
  
  <p>I tried to use <code>GROUP BY</code>:</p>
  
  <pre><code> SELECT 
      LastName, FirstName, Def_flag 
   FROM 
      Employees 
   WHERE 
      Def_flag = 0 
   GROUP BY 
      LastName, FirstName, Def_flag
  </code></pre>
  
  <p>but the result doesn't satisfy me because the record Andrew Fuller get into the table too.</p>
  
  <p>How do I need to change query?</p>
  
  <p>Regards, Alexander.</p>