Operation Details
Description: Counts the number of service delivery either successful or not successful to arrive at the current value of rate of achievement of successful outcome for all the services service which are associated with the contract. @deprecated since 7.0.0.0, This functionality forms part of a feature that is no longer relevant to the product strategy and will not be replaced.
Sterotype: ns
SQL
 SELECT
  COUNT(ServiceDelivery.serviceDeliveryID)
INTO
  :count 
FROM
  ServiceDelivery,
  ContractVersion,
  ContractPOLink,
  ProviderOffering 

  WHERE ContractVersion.contractVersionID = :resourceID 
  AND ServiceDelivery.providerID = ContractVersion.concernRoleID
  AND ServiceDelivery.status =:status  
  AND ServiceDelivery.outcomeAchieved = :outcomeAchieved
  AND ContractVersion.contractVersionID = ContractPOLink.contractVersionID
  AND  ProviderOffering.providerOfferingID= ContractPOLink.providerOfferingID 
  AND  ProviderOffering.serviceofferingID=ServiceDelivery.serviceofferingID
  AND
 (
  ServiceDelivery.coverperiodstartdate BETWEEN ContractVersion.startDate 
          AND ContractVersion.endDate
	  OR ServiceDelivery.coverperiodenddate BETWEEN            ContractVersion.startDate
          AND ContractVersion.endDate
	  OR ContractVersion.startDate BETWEEN            ServiceDelivery.coverperiodstartdate
          AND  ServiceDelivery.coverperiodenddate
	  OR ContractVersion.endDate  BETWEEN             ServiceDelivery.coverperiodstartdate
          AND   ServiceDelivery.coverperiodenddate
)