title: How to get rows In each Group with minimum order group and special name in SQL Server
body: <p>i have a table similar this</p>
  
  <pre><code>CREATE TABLE [dbo].[Test](
      [Name] [NCHAR](10) NULL,
      [GroupId] [INT] NULL,
      [GroupOrder] [INT] NULL
      )
  </code></pre>
  
  <p>and below values</p>
  
  <pre><code>INSERT INTO [dbo].[Test]([Name],[GroupId],[GroupOrder]) VALUES ('A',1,1)
  INSERT INTO [dbo].[Test]([Name],[GroupId],[GroupOrder]) VALUES ('A-1',1,2)
  INSERT INTO [dbo].[Test]([Name],[GroupId],[GroupOrder]) VALUES ('B',2,1)
  INSERT INTO [dbo].[Test]([Name],[GroupId],[GroupOrder]) VALUES ('B',2,2)
  INSERT INTO [dbo].[Test]([Name],[GroupId],[GroupOrder]) VALUES ('B-1',2,3)
  INSERT INTO [dbo].[Test]([Name],[GroupId],[GroupOrder]) VALUES ('C',3,1)
  INSERT INTO [dbo].[Test]([Name],[GroupId],[GroupOrder]) VALUES ('C-1',3,2)
  INSERT INTO [dbo].[Test]([Name],[GroupId],[GroupOrder]) VALUES ('C-1',3,3)
  INSERT INTO [dbo].[Test]([Name],[GroupId],[GroupOrder]) VALUES ('D',4,1)
  INSERT INTO [dbo].[Test]([Name],[GroupId],[GroupOrder]) VALUES ('D',4,2)
  </code></pre>
  
  <p>i need output like this: rows In each Group with minimum order group and name field contain "-1" </p>
  
  <pre><code>    Name    GroupId GroupOrder
      A-1         1   2
      C-1         3   2
      B-1         2   3
  </code></pre>