code: func (s *CreateContinuousQueryStatement) RequiredPrivileges() (ExecutionPrivileges, error) {
  	ep := ExecutionPrivileges{{Admin: false, Name: s.Database, Privilege: ReadPrivilege}}
  
  	// Selecting into a database that's different from the source?
  	if s.Source.Target.Measurement.Database != "" {
  		// Change source database privilege requirement to read.
  		ep[0].Privilege = ReadPrivilege
  
  		// Add destination database privilege requirement and set it to write.
  		p := ExecutionPrivilege{
  			Admin:     false,
  			Name:      s.Source.Target.Measurement.Database,
  			Privilege: WritePrivilege,
  		}
  		ep = append(ep, p)
  	}
  
  	return ep, nil
  }
docs: // RequiredPrivileges returns the privilege required to execute a CreateContinuousQueryStatement.