title: Split the output rows in groups in SQL Server
body: <p>I have to divide the rows equally,
  so here, for example, there are 15 rows. I want to divide equally, which is in three groups, but I want the name to come only in front of the first entry of each group, as shown:</p>
  
  <pre><code>DECLARE @NAMES TABLE
  (
  [ID] INT IDENTITY,
  [NAME] VARCHAR(20)
  )
  
  
  INSERT INTO @NAMES
  SELECT 'NAME1' UNION ALL
  SELECT 'NAME2' UNION ALL
  SELECT 'NAME3' UNION ALL
  SELECT 'NAME4' UNION ALL
  SELECT 'NAME5' UNION ALL
  SELECT 'NAME6' UNION ALL
  SELECT 'NAME7' UNION ALL
  SELECT 'NAME8' UNION ALL
  SELECT 'NAME9' UNION ALL
  SELECT 'NAME10' UNION ALL
  SELECT 'NAME11' UNION ALL
  SELECT 'NAME12' UNION ALL
  SELECT 'NAME13' UNION ALL
  SELECT 'NAME14' UNION ALL
  SELECT 'NAME15' 
  </code></pre>
  
  <p>Desired Output:</p>
  
  <pre><code>ID          NAME
  ----------- --------------------
  1           NAME1
  2           
  3           
  4           
  5           
  6           NAME6
  7           
  8           
  9           
  10          
  11          NAME11
  12          
  13          
  14    
  15
  </code></pre>