code: func (gbi *groupByIterator) Next() (ret GroupCount, done bool) {
  	// loop until we find a result with count > 0
  	for {
  		if gbi.done {
  			return ret, true
  		}
  		if len(gbi.rows) == 1 {
  			ret.Count = gbi.rows[len(gbi.rows)-1].row.Count()
  		} else {
  			ret.Count = gbi.rows[len(gbi.rows)-1].row.intersectionCount(gbi.rows[len(gbi.rows)-2].row)
  		}
  		if ret.Count == 0 {
  			gbi.nextAtIdx(len(gbi.rows) - 1)
  			continue
  		}
  		break
  	}
  
  	ret.Group = make([]FieldRow, len(gbi.rows))
  	copy(ret.Group, gbi.fields)
  	for i, r := range gbi.rows {
  		ret.Group[i].RowID = r.id
  	}
  
  	// set up for next call
  
  	gbi.nextAtIdx(len(gbi.rows) - 1)
  
  	return ret, false
  }
docs: // Next returns a GroupCount representing the next group by record. When there
  // are no more records it will return an empty GroupCount and done==true.