# A.7 Value Rules

## A.7 Value Rules

 Table: PURCHASE_ORDER Description: Compute the number of orders for the same part in each month period and show all part numbers and the number of orders where the number is greater than three. Rule Logic: SELECT PART_NUMBER, MONTH(DATE_OF_ORDER),YEAR(DATE_OF_ORDER), COUNT (*) GROUP BY PART_NUMBER,MONTH(DATE_OF_ORDER),YEAR(DATE_OF_ORDER) WHERE COUNT(*) > 3 Expectation: Expect none on the list. The inventory reordering algorithm should be ordering enough quantity not to have to reorder more than once a month. Multiple orders may be acceptable, but only under special circumstances.
 Table: PURCHASE_ORDER Description: Compute the total value of all purchase orders for a month by each category of inventory. Then compute the percentage of the total orders placed that each category provided. Compare this with historical distribution of orders. Rule Logic: SELECT INVENTORY.TYPE,SUM(PURCHASE_ORDER.QUANTITY*PURCHASE_ORDER.UNIT_PRICE)MONTH(DATE_OF_ORDER),YEAR(DATE_OF_ORDER), COUNT (*) FROM PURCHASE_ORDER. INVENTORY GROUP BY INVENTORY.TYPEMONTH(DATE_OF_ORDER),YEAR(DATE_OF_ORDER) WHERE INVENTORY.PART_NUMBER =PURCHASE_ORDER.PART_NUMBER Expectation: The percentage of the value of orders placed for each category should not vary from month to month by more than 10%.  BackCover  Data Quality-The Accuracy Dimension  Foreword  Preface  Part I: Understanding Data Accuracy  Part II: Implementing a Data Quality Assurance Program  Part III: Data Profiling Technology  Appendix A: Examples of Column Properties, Data Structure, Data Rules, and Value Rules  A.2 Tables  A.3 Column Properties  A.4 Structure Rules  A.5 Simple Data Rules  A.6 Complex Data Rules  A.7 Value Rules  Appendix B: Content of a Data Profiling Repository  References  List of Figures