code: func (p *Parser) parseShowSeriesCardinalityStatement(exact bool) (Statement, error) {
  	var err error
  	stmt := &ShowSeriesCardinalityStatement{Exact: exact}
  
  	// Parse optional ON clause.
  	if tok, _, _ := p.ScanIgnoreWhitespace(); tok == ON {
  		if stmt.Database, err = p.ParseIdent(); err != nil {
  			return nil, err
  		}
  	} else {
  		p.Unscan()
  	}
  
  	// Parse optional FROM.
  	if tok, _, _ := p.ScanIgnoreWhitespace(); tok == FROM {
  		if stmt.Sources, err = p.parseSources(false); err != nil {
  			return nil, err
  		}
  	} else {
  		p.Unscan()
  	}
  
  	// Parse condition: "WHERE EXPR".
  	if stmt.Condition, err = p.parseCondition(); err != nil {
  		return nil, err
  	}
  
  	// Parse dimensions: "GROUP BY DIMENSION+".
  	if stmt.Dimensions, err = p.parseDimensions(); err != nil {
  		return nil, err
  	}
  
  	// Parse limit & offset: "LIMIT <n>", "OFFSET <n>".
  	if stmt.Limit, err = p.ParseOptionalTokenAndInt(LIMIT); err != nil {
  		return nil, err
  	} else if stmt.Offset, err = p.ParseOptionalTokenAndInt(OFFSET); err != nil {
  		return nil, err
  	}
  
  	return stmt, nil
  }
docs: // This function assumes the "SHOW SERIES EXACT CARDINALITY" or the
  // "SHOW SERIES CARDINALITY" tokens have already been consumed.