title: How to select top N rows in a Linq GroupBy
body: <p>hope you can help me out here. 
  I have a list of Bookings where I would like to get the top 2 rows in each group of TourOperators.</p>
  
  <p>here's a sample of the data:</p>
  
  <pre><code>List&lt;Booking&gt; list = new List&lt;Booking&gt;();
          list.Add(new Booking() { BookingNo = "31111111", DepDate = new DateTime(2011, 5, 1), TourOperator = "SPI" });
          list.Add(new Booking() { BookingNo = "32222222", DepDate = new DateTime(2011, 5, 2), TourOperator = "SPI" });
          list.Add(new Booking() { BookingNo = "33333333", DepDate = new DateTime(2011, 5, 3), TourOperator = "SPI" });
          list.Add(new Booking() { BookingNo = "34444444", DepDate = new DateTime(2011, 5, 4), TourOperator = "SPI" });
          list.Add(new Booking() { BookingNo = "35555555", DepDate = new DateTime(2011, 5, 5), TourOperator = "SPI" });
          list.Add(new Booking() { BookingNo = "36666666", DepDate = new DateTime(2011, 5, 6), TourOperator = "SPI" });
          list.Add(new Booking() { BookingNo = "11111111", DepDate = new DateTime(2011, 5, 1), TourOperator = "VIN" });
          list.Add(new Booking() { BookingNo = "12222222", DepDate = new DateTime(2011, 5, 2), TourOperator = "VIN" });
          list.Add(new Booking() { BookingNo = "13333333", DepDate = new DateTime(2011, 5, 3), TourOperator = "VIN" });
          list.Add(new Booking() { BookingNo = "14444444", DepDate = new DateTime(2011, 5, 4), TourOperator = "VIN" });
          list.Add(new Booking() { BookingNo = "15555555", DepDate = new DateTime(2011, 5, 5), TourOperator = "VIN" });
          list.Add(new Booking() { BookingNo = "16666666", DepDate = new DateTime(2011, 5, 6), TourOperator = "VIN" });
          list.Add(new Booking() { BookingNo = "17777777", DepDate = new DateTime(2011, 5, 7), TourOperator = "VIN" });
  </code></pre>
  
  <p>I have this Linq, but it only gives me the first Booking in each group:</p>
  
  <pre><code>List&lt;Booking&gt; yetAnotherList = list.GroupBy(row =&gt; row.TourOperator)
              .Select(g =&gt; g.OrderBy(row =&gt; row.DepDate).First()).ToList();
  </code></pre>
  
  <p>The data I was hoping for was something like this:</p>
  
  <p>31111111, 2011-05-01, SPI<br>
  32222222, 2011-05-02, SPI<br>
  11111111, 2011-05-01, VIN<br>
  12222222, 2011-05-02, VIN  </p>
  
  <p>Thanks.</p>