code: func (s *SelectStatement) RequiredPrivileges() (ExecutionPrivileges, error) {
  	ep, err := s.Sources.RequiredPrivileges()
  	if err != nil {
  		return nil, err
  	}
  
  	if s.Target != nil {
  		ep = append(ep, ExecutionPrivilege{Admin: false, Name: s.Target.Measurement.Database, Privilege: WritePrivilege})
  	}
  	return ep, nil
  }
docs: // RequiredPrivileges returns the privilege required to execute the SelectStatement.
  // NOTE: Statement should be normalized first (database name(s) in Sources and
  // Target should be populated). If the statement has not been normalized, an
  // empty string will be returned for the database name and it is up to the caller
  // to interpret that as the default database.