Patent Document

BACKGROUND OF THE INVENTION 
     The present invention relates to an improvement in an electronic cash register which can count the number of customers who purchase a particular commodity or item on sale and, more particularly, an electronic cash register which has a function to determine a correlation between a specific item on sale and a factor associated therewith, such as another item or hour of the day. 
     A conventional electronic cash register is known to count the number of customers who purchase items classified into categories. This register counts the number of customers in the following manner. The register has a counter for each category of items. When a customer purchases an item, the corresponding counter is incremented by 1 so that the total number of customers who purchase items of this category can be determined. 
     However, in such a conventional electronic cash register, the number of customers for each category of items is independently produced when stored data is looked up. This means that the total number of customers who purchase a particular item cannot be determined. It is impossible to determine the number of customers who purchase two particular items, or either of such two particular items. In other words, a correlation between the number of customers who purchase different items, or the number of customers who purchase a particular item at a specific hour cannot be determined. For this reason, associated items cannot be effectively displayed or advertised, and the item display cannot be appropriately changed in accordance with hours. 
     SUMMARY OF THE INVENTION 
     The object of the present invention is to provide an electronic cash register which can obtain a correlation between the sales total of a particular item and another factor such as the sales total of another item, an hour or a clerk. 
     In order to achieve the above object of the present invention, there is provided an electronic cash register comprising: 
     input means, having a plurality of keys for inputting commodity data on items purchased by customers and boundary code data representing a boundary between each two customers who purchase the items; 
     memory means for storing the commodity data and the boundary code data inputted by said input means in an order inputted; 
     designating means for designating a given condition so as to obtain the number of customers who satisfy the given condition; 
     detecting means for detecting if commodity data of each of data groups of the commodity data bounded by the boundary code data stored in said memory means satisfies the given condition designated by said designating means; and 
     counting means for counting the number of data groups which are detected by said detecting means to satisfy the given condition designated by said designating means. 
     With an electronic cash register of this construction, the relationship between the sales of a particular item and other factors such as the sales of another item, an hour, or a clerk can be determined. This allows a user to easily determine which items are often bought together with other items, thus providing effective and efficient purchase from wholesalers, displays and advertising of commodities. Trends or changes in demands or choice by customers can also be easily obtained, and clerks can be assigned to the most effective working positions. This contributes to an increased sales total. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing the configuration of a system of an electronic cash register according to an embodiment of the present invention; 
     FIGS. 2A to 2C are flow charts for explaining the operation of the electronic cash register according to the embodiment of the present invention; FIGS. 3, 5, 7, 9, 11, 12, 13 and 14 are views showing the key operations for operating the electronic cash register according to the embodiment of the present invention; 
     FIGS. 4, 6 and 8 are views showing receipts printed out by the electronic cash register according to the embodiment of the present invention; and 
     FIG. 10 is a diagram showing an example of memory contents in a PLU code data memory in the electronic cash register according to the embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The preferred embodiment of the present invention will now be described with reference to the accompanying drawings. The configuration of a system of the electronic cash register according to this embodiment will be described first. 
     The system of the electronic cash register according to this embodiment has a key input section 1; a CPU 3 connected to the key input section 1; a memory section 5 having a PLU (Price Look Up) code data memory 51, a sum data memory 53 and a ROM 55 which are connected to the CPU 3; and an output section 7 having a printer 71 and a display 73 which are connected to the CPU 73. 
     The key input section 1 has numeric keys 11, department keys 13, a PLU key 15, a charge key 17, a sub total key 19, a cash amount tendered key 21, clerk keys 23, and a mode switch 25. The PLU key 15 and the numeric keys 11 are used together to input PLU code data. The PLU code data is commodity classification code data which is specific to each type of commodity. For the sake of simplified description, 990 types of PLU code data from &#34;001&#34; to &#34;990&#34; are assumed to be present. The numeric keys 11 are used to input PLU code data, an amount, and the like. The department keys 13 are used to input the department of an item purchased. In this embodiment, four types of departments from &#34;01&#34; to &#34;04&#34; are present. The charge key 17 is used to register a charge payment amount. The sub total key 19 is used to calculate the sub total of sales amounts. The cash amount tendered key 21 is used to register a cash payment amount. 
     The charge key 17 and the cash amount tendered key 21 are transaction keys used to total the transaction of each customer. The clerk keys 23 are used to designate a clerk operating this particular cash register. The sub total key 19 is used to designate &#34;logic OR&#34; to be described later (to calculate the number of customers who purchase at least one of a plurality of items). The cash amount tendered key 21 is used to designate &#34;logic AND&#34; to be described later (the number of customers who purchase all of designated items). The mode switch 25 is used to set one of the preset mode (PR), the register mode (REG), the read mode (X), the reset mode (Z), and the power-off mode (OFF). 
     The CPU 3 can be of a general type and has A, B, C, D, E, F, I, K and L registers, an ALU 31 for performing various arithmetic operations, and a control section 33 for performing various control operations. In response to microinstructions stored in the ROM 55, the CPU 3 performs various processing of input data from the keys 1 to 23 and the mode switch 25. The A to L registers are used for general arithmetic operations and for calculating a correlation between items to be described later. The A and B registers store designated PLU code data. The C register stores data representing &#34;logic OR&#34; or &#34;logic AND.&#34; The D register stores the contents of the PLU code data memory 51. The E register stores the total number of customers, the F register stores the calculated number of customers, and the I register stores a designating address. When the PLU code stored in the A register is detected during a retrieval operation to be described later, a flag is set in the K register. When the PLU code stored in the B register is detected during a retrieval operation to be described later, a flag is set in the L register. 
     The PLU code data memory 51 has a memory area of 1 to N addresses and stores input data in the order it is received. The CPU 3 sequentially writes in the PLU code data memory 51, the PLU code data inputted through the key input section 1, the key code data &#34;999&#34; of the cash amount tendered key 21, and the key code data &#34;998&#34; of the charge key 17 in the order they are inputted. As described earlier, the cash amount tendered key 21 and the charge key 17 are transaction keys and are keyed at every sales transaction (registration of each customer). Therefore, the code data &#34;999&#34; and &#34;998&#34; serve as boundary code data which present a boundary between one customer and the next customer. In this manner, the PLU code data memory 51 stores the PLU code data of items purchased in the order inputted. 
     The sum data memory 53 consists of an item memory 57, a department memory 59, a transaction memory 61, and a clerk memory 63. The item memory 57 has a field 571 for storing the number of items of each PLU code data (&#34;001&#34; to &#34;990&#34;) sold, a field 573 for storing the unit price of each type of item, and a field 575 for storing a department link destination address for each type of item. The department memory 59 has a field 591 for storing the number of items sold in each department (&#34;001&#34; to &#34;04&#34;), and a field 593 for storing the total sales amount of these items in each department. The transaction memory 61 has a field 611 for storing the number of items of each transaction type (cash and charge), and a field 613 for storing the total sales amount of these items for each transaction type. The clerk memory 63 has a field 631 for storing the number of items sold by each clerk (I to IV) and a field 633 for storing the total sales amount of each clerk. When PLU code data is input through the key input section 1, the CPU 3 accumulates the number of items sold which is stored in the corresponding field 571 of the item memory 57. In accordance with the department link addresses stored in the field 575, the CPU 3 accumulates the number of items sold and the total sales amount which are stored in the transaction memory 61 and the clerk memory 63. The printer 71 and the display 73 print or display various data under the control of the CPU 3. 
     The operation of the electronic cash register according to this embodiment will be described with reference to the flow chart shown in FIGS. 2A to 2C, the key operations shown in FIGS. 3, 5 and 7, and the receipts shown in FIGS. 4, 6 and 8. When a sales transaction is registered, the operator inputs the PLU code data of items purchased by a customer from the key input section 1. When input of the data for the items purchased by this customer is completed, the operator depresses the cash amount tendered key 21 in the case of a cash sale or the charge key 17 in the case of a charge sale, thereby calculating the total sales amount for this customer. The PLU code data input by the operator is supplied to the CPU 3. The CPU 3 writes the input PLU code data in the PLU code data memory 51 in the order it is inputted. The CPU 3 also writes the key code data &#34;999&#34; of the cash amount tendered key 21 or the key code data &#34;998&#34; of the charge key 17 in the PLU code data memory 51. Therefore, the PLU code data memory 51 stores the PLU code data and the code data &#34;999&#34; and &#34;998&#34; in the order they are inputted. The CPU 3 accumulates the number of items sold in the field 571 of the memory 57 which corresponds to the input PLU code data. In accordance with the department link addresses stored in the field 575, the CPU 3 accumulates the total number of items sold and the total sales amount in the memory 59 and also accumulates the total number of items sold and the total sales amount in the memorys 61, 63. In this manner, the register operation for each customer is performed. The number of items sold for each PLU code data and the corresponding total sales amount are stored in the item memory 57. The number of items sold for each department and the corresponding total sales amount are stored in the department memory 59. The number of items sold for each type of transaction and the corresponding total sales amount are stored in the transaction memory 61. The number of items sold by each clerk and the corresponding total sales amount are stored in the clerk memory 63. 
     A method of calculating a correlation between the sales of different items will be described below. As earlier described with reference to the configuration of the system of this embodiment, the A and B registers store the designated PLU code data, and the C register stores data representing a condition to be satisfied by the PLU code data stored in the A and B registers. The D register stores the contents of the PLU code data memory 51, the E register stores the total number of customers, the F register stores the calculated number of customers, and the I register stores the designating address. When the PLU code data stored in the A and B registers is detected during a retrieval operation, a flag is set in the K and L registers. In a description to follow, a method of calculating the number of customers who purchase at least one (&#34;logic OR&#34;) of the PLU code data &#34;121&#34; items and the PLU code data &#34;113&#34; items, and its proportion (rate) to the total number of customers will be explained. 
     First, the mode switch 25 is set in the read mode (X). Next, the PLU code data and a condition to be satisfied are preset. Then, keys &#34;1,&#34; &#34;2&#34; and &#34;1&#34; of the numeric keys 11, the PLU key 15, the keys &#34;1,&#34; &#34;1&#34; and &#34;3&#34; of the numeric keys 11 and the PLU key 15 are operated in the order shown in FIG. 3. Then, the PLU code data &#34;121&#34; is set in the A register, and the PLU code data &#34;113&#34; is set in the B register. When the operator depresses the sub total key 19 next, the CPU 3 starts the sequence according to the flow chart shown in FIGS. 2A to 2C from START I: In step S1, the CPU 3 sets the value &#34;001&#34; representing &#34;logic OR&#34; in the C register. In step S2, the contents of the D, E and F registers are cleared. In step S3, the initial address &#34;001&#34; of the PLU code data memory 51 is set in the I register. The CPU 3 loads in the D register, the code PLU data, the cash code data &#34;999&#34; or charge code data &#34;998,&#34; which is written in the address &#34;001&#34; of the PLU code data memory 51 which is designated by the content of the I register in step S4. In step S5, the CPU 3 checks if the content of the D register is &#34;000.&#34; In other words, it is checked if the address designated by the I register has reached an area of the PLU code data 51 in which no data is written. In step S6, the CPU 3 checks if the content of the D register coincides with that of the A register, i.e., if the content of the D register is &#34;121.&#34; 
     When it is determined in step S6 that the contents do not coincide, the control flow advances to step S8. However, if the contents coincide with each other in step S6, the CPU 3 sets a first flag in the K register and the control flow advances to step S8. In step S8, it is checked if the content of the D register coincides with that of the B register, i.e., if the content of the D register is &#34;113.&#34; If the contents do not coincide with each other in step S8, the control flow advances to step S10. However, if the contents coincide with each other in step S8, the control flow advances to step S9. In step S9, a second flag is set in the L register. Thereafter, the control flow advances to step S10. In step S10, it is checked if the content of the D register is &#34;999&#34; or &#34;998.&#34; That is, the CPU 3 checks if retrieval for one customer has been completed. If the content is neither &#34;999&#34; nor &#34;998&#34; in step S10, the control flow advances to step S11. In step S11, the content of the I register is incremented by 1, i.e., the next address of the PLU code data memory 51 is designated. In this case, the address &#34;002&#34; of the PLU code data memory 51 is designated. In step S12, it is checked if the content of the I register exceeds N, i.e., if the address of the PLU code data memory 51 from which the PLU code data is to be read out next and has exceeded the final address of the PLU code data memory 51. If it is determined in step S12 that the content of the I register has not exceeded N, the control flow returns to step S4. The contents at the address 2 of the PLU code data memory are read out and the flow of steps S4 to S12 is repeated. 
     When a retrieval operation for one customer has been completed, i.e., when it is determined in step S10 that the content of the D register is &#34;999&#34; or &#34;998,&#34; the control flow advances to step S13. In step S13, the content of the E register is incremented by 1, i.e., the number of customers for which the retrieval operation has been performed is set in the E register. Then, the control flow advances to step S14 wherein the content of the C register is discriminated. In this case, since the content of the C register is &#34;001,&#34; the control flow advances to step S15. In step S15, it is checked if the flags are set in the K register and/or the L register. If the flags are set in the K and/or L register, i.e., if a customer purchases at least one of the items having the PLU code data &#34;113&#34; and &#34;121,&#34; the control flow advances to step S16. In step S16, the content of the F register representing the number of customers who purchased at least one item of these code numbers is incremented by one, thereby updating the F register. In step S17, for the next retrieval operation, the contents of the K and L registers are cleared, and the flow advances to step S11. When it is determined in step S15 that the flag is not set in either of the K and L registers, that is, the customer does not purchase either of the two items, the content of the F register is left non-updated. At this time, since the flag is not set in the K and L registers, the flow advances to step S11 skipping step S17. In step S11, the content of the I register is incremented by 1. Thereafter, the processing of steps S4 to S17 is performed for the next customer. A similar operation is performed for other customers. When the content of the I register reaches the final address N of the PLU code data memory 51, is determined in step S12 and the retrieval operation is completed. When the content of the I register reaches an area of an address of the PLU code data memory 51 in which no data is written, that is, when processing of the stored data is completed, this is determined in step S5. The retrieval operation ends, and the control flow advances to step S18. 
     At this time, the content of the E register indicates the total number of customers, and the content of the F register indicates the number of customers who purchase at least one of the items of the code data &#34;121&#34; and &#34;113.&#34; 
     When the retrieval operation is completed, the flow goes to the next printing processing. Printing processing is performed in the following manner. In step S18, the CPU 3 reads out the content &#34;121&#34; of the A register and the printer 71 prints &#34;PLU 121&#34; as shown in FIG. 4. In step S19, the CPU 3 checks if data is set in the B register. In this case, the PLU code data &#34;113&#34; is stored in the B register, and the control flow advances to step S20. In step S20, the CPU 3 checks the content of the C register. Since the content of the C register is &#34;001,&#34; the control flow advances to step S21 and the printer 71 prints OR. In step S22, the CPU 3 reads out the PLU code data &#34;113&#34; from the B register and prints it out. 
     In step S23, the content of the F register, i.e., the number of customers (CPC (Commodity Purchased Customers)) who purchase at least one of the items of the PLU code data &#34;121&#34; and &#34;113,&#34; and the word &#34;CPC&#34; are printed. The number of customers is assumed to be 130 herein. In step S24, the CPU 3 divides this number of customers by the total number of customers and multiplies the quotient by 100. In other words, the CPU 3 divides the content of the F register by the content of the E register and multiplies the quotient by 100. Thus, the rate of the number of customers who purchase at least one of the items of the PLU code data &#34;121&#34; and &#34;113&#34; to the total number of customers is calculated. Assume that the total number of customers is 850 and the rate is &#34;15.3%.&#34; In step S25, the rate and the word &#34;RATE&#34; are printed. In step S26, the contents of the A, B and C registers are cleared for the next processing. In this manner, the number of customers who purchase at least one of specific items, for example, items of the PLU code data &#34;121&#34; and &#34;113,&#34; and the rate of such customers occurring in the total number of customers are calculated. 
     Next, a method for calculating the number of customers who purchase the item of the PLU code data &#34;121&#34; and its rate occurring in the total number of customers will be described. First, the mode switch 25 is set in the X mode. According to the procedures in FIG. 5, the keys &#34;1,&#34; &#34;2&#34; and &#34;1&#34; of the numeric keys 11, the PLU key 15 and the sub total key 19 are operated in the order shown in FIG. 5. Then, the PLU code data &#34;121&#34; is set in the A register, and no data is set in the B register. Therefore, &#34;000&#34; set in step S26 is set in the B register. When the sub total key 19 is operated, the processing of the program START I is started as in the above case. In step S1, &#34;001&#34; is set in the C register. Thereafter, the processing is executed in accordance with the flow chart shown in FIGS. 2A to 2C. At this time, since the content of the B register is &#34;000,&#34; in step S8, the content of the D register does not coincide with that of the B register. Therefore, the control flow does not advance to step S9, and the second flag is not set in the L register. In step S15, it is determined that the flag is not set in the L register. Since it is determined in step S19 that the content of the B register is &#34;000,&#34; the control jumps to step S23. Thus, neither &#34;OR&#34; nor the content of the B register are printed in steps S20 and S21. Therefore, the number (54 herein) and the word &#34;CPC,&#34; the rate (8.2% herein) and the word &#34;RATE&#34; are printed on a receipt as shown in FIG. 6. 
     In this manner, the number of customers who purchase a particular type of item and a ratio of such customers to the total number of customers can be calculated. 
     A method of calculating the number of customers who purchase both (&#34;logic AND&#34;) of two types of items and a ratio of such customers to the total number of customers will be described with reference to FIGS. 2A to 2C and 7 and 8. For the purpose of description, it is assumed that the number of customers (CPC) who purchase both items of the PLU code data &#34;121&#34; and &#34;113&#34; and the ratio of such customers to the total number of customers are calculated. First, as shown in FIG. 7, the keys &#34;1,&#34; &#34;2,&#34; and &#34;1&#34; of the numeric keys 11, the PLU key 15, the keys &#34;1,&#34; &#34;1&#34; and &#34;3&#34; of the numeric keys, the PLU key 15 and finally the cash amount tendered key 21 for designating &#34;logic AND&#34; are depressed. Then, &#34;121&#34; is set in the A register, and &#34;113&#34; is set in the B register. Unlike the case described above, when the cash amount tendered key 21 is depressed, the processing of the program START II is started. In step S27, a value &#34;010&#34; representing &#34;logic AND&#34; is set in the C register. As in the case of calculating &#34;logic OR&#34; described above, the CPU 3 executes the processing in accordance with the flow chart shown in FIGS. 2A to 2C. As in the above case of &#34;logic OR,&#34; the CPU 3 checks if the PLU code data &#34;121&#34; and &#34;113&#34; are stored for each customer (within area bounded by boundary code data &#34;999&#34; and &#34;998&#34;) in steps S4 to S12. When the PLU code data &#34;121,&#34; &#34;113&#34; are detected, the CPU 3 sets a flag in the K and L registers. When the retrieval operation for one customer is completed, the content of the E register representing the total number of customers is incremented by 1 in step S13. The control flow advances to step S28. When the flags are set in both the K and L registers, the content of the F register representing the target customer number is incremented by 1. When the flag is not set in at least one of the K and L registers, the customer has not purchased at least one of the items and the content of the F register is not operated. 
     When the retrieval operation is completed for the total number of customers, i.e., the data stored in the PLU code data memory 51, this is determined in step S5 or S12. 
     The control operation advances to printing processing, and a receipt as shown in FIG. 8 is printed. 
     In printing processing, the CPU 3 checks in step S20 if the content of the C register is &#34;010.&#34; Therefore, in step S29, the printer 71 prints &#34;AND&#34; as shown in FIG. 8. In steps S23 and S25, the printer 71 prints out the word &#34;CPC&#34; and the number of customers who purchase both of the items of the PLU code data &#34;121&#34; and &#34;113,&#34; i.e., 26 herein, and the rate of these customers to the total number of customers of 2.3%. In this manner, the number of customers who purchase two items, and the ratio of these customers to the total number of customers can be determined. The number of customers who purchase the item of the PLU code data &#34;113&#34; can be calculated by the same operation as described above. This can be calculated in accordance with 130-54+26=102 from the value obtained by the above method. 
     In the above methods, the number of customers who purchase both of the items having the PLU code data &#34;121&#34; and &#34;113,&#34; the number of customers who purchase at least one of the items, the number of customers who purchase items of the code data &#34;121,&#34; the number of customers who purchase items of the code data &#34;113,&#34; and the corresponding rates can be calculated. With these methods, it can be confirmed, for example, that substantially half of the customers who purchase items of the PLU code data &#34;121&#34; purchase items of the code &#34;113,&#34; but only a quarter of the customers who purchase items of the code &#34;113&#34; purchase the items of code &#34;121.&#34; In this manner, when the electronic cash register of this embodiment is used, the number of customers who purchase a particular item can also be calculated as in conventional cash registers. Furthermore, the number of customers who purchase both of these types of items or at least one of these types of items can be calculated. In this manner, a correlation between sales of two items can be determined. So, for example, it can be confirmed that one type of item sells well with another specific type of item. Then, the buying of items from wholesalers, displays and advertising of items can be effectively performed. For example, associated items can be displayed together to provide good sales effect. Since the ratio of the customers who purchase a particular type of item to the total number of customers can be determined; trends or changes in the demand and choise by customers can be determined. 
     The above embodiment is described with reference to the items having the PLU code data &#34;121&#34; and &#34;113.&#34; However, the present invention is not limited to the foregoing. A similar operation can be performed for items having department code data. For example, it is possible to calculate the number of customers who purchase at least one of the items having the PLU code data &#34;121&#34; and an item having department code data &#34;03.&#34; The key operations in this case are shown in FIG. 9. In steps S6 and S8 in the flow chart shown in FIGS. 2A to 2C, after the contents of the A and B registers are determined to be the PLU code data or the department code data, the content of the D register is compared with those of the A and B registers. 
     In step S8, it is checked if the content of the B register is the department code data, and if the PLU code data stored in the D register is included in the department (&#34;03&#34;), the code data which is stored in the B register. 
     If the PLU code data stored in the D register corresponds to the department code data stored in the B register, the second flag is set in the L register in step S9. Then, a correlation between sales of an item and items of a particular department can be determined. 
     In this embodiment, in order to calculate the number of customers who purchase both of two items (in order to designate &#34;logic AND&#34;), the cash amount tendered key 21 is operated. Furthermore, in order to calculate the number of customers who purchase at least one of the two items (in order to designate &#34;logic OR&#34;), the charge key 17 is operated. However, the key operations for calculating a correlation are not limited to the method described above. 
     In the above embodiment, the PLU code data memory 51 stores the PLU code data and code data &#34;999&#34; and &#34;998&#34; in the order they are inputted. However, the present invention is not limited to this arrangement. Thus, the PLU code data memory 51 can store data other than PLU code data. For example, the PLU code data memory 51 can store the boundary code &#34;999&#34; or &#34;998&#34; and thereafter receipt numbers 511 (n150 and n151), as shown in FIG. 10. A clock circuit can be incorporated to store times 513 (10 : 10, 10 : 12) at which the cash amount tendered key 21 and the charge key 17 are operated. Clerk codes 515 (II) can be stored. When these data are stored, the sales total within a specific hourly range or within a specific receipt number range can be calculated. A method of calculating the number of customers who purchase at least one of the items having the PLU code data &#34;121&#34; and &#34;113&#34; between 10 o&#39;clock and 12 o&#39;clock and the rate of occurrence in the total number of customers, and the key operations for performing this calculation are shown in FIG. 11. A &#34;TIME&#34; key is a key for designating a time range. 
     By performing the key operations as shown in FIG. 12, the number of customers who purchase at least one of the items having the PLU code &#34;121&#34; and &#34;113&#34; within a receipt number range of 50 to 100, and the rate of occurrence in the total number of customers can be calculated. A &#34;No&#34; key is a key for designating a number range of receipts (A correlation between a clerk and sales can also be determined). FIG. 13 shows an example of key operations when a customer purchases an item of the PLU code data &#34;121&#34; and a clerk II handles this transaction. An &#34;AND&#34; key is a key for designating &#34;logic AND,&#34; and a &#34;II&#34; key is a key for designating the clerk II of the clerk keys 23. Processing can be performed in the following manner. When it is determined in step S10 of the flow chart shown in FIG. 2B that the retrieval operation for one customer is completed, the sales time data, the receipt No data, and the clerk data for a customer are read out and it is checked if these data satisfy the designated condition. When the data are determined to satisfy the designated condition, the contents of corresponding registers are updated. In this manner, details of a demand from a customer and correlations of items sold to customers can be determined. For example, specific items can be advertised within a specific hourly range. A correlation between a clerk and items can be determined. The method of storing data in the memory 51, the key operation, the program processing method and the like are not limited to those described above. 
     In the above embodiment, the code data &#34;999&#34; and &#34;998&#34; are used to distinguish between cash and charge transactions. Therefore, the number of customers (rate) by cash and charge transactions can be separately determined. In this case, the code data &#34;999&#34; representing the cash transaction and the code data &#34;998&#34; representing the charge transaction are designated first, and then the condition for the item or the like is designated. According to the program processing performed, it is first checked if a specific data group is bounded by the designated boundary code data. It is then checked if the code data group which is bounded by the designated data group satisfies the condition for the item. The number of customers who satisfy the designated condition is counted. However, the present invention is not necessarily limited to this arrangement. The code data for cash and charge transactions need not be different from each other and can be the same. The cash amount tendered key 21 and the charge key 17 are examples of transactions, and another key such as a credit key can be used. In the above embodiment, the PLU code data consist of &#34;001&#34; to &#34;999.&#34; However, the number of PLU data is not limited this, and the number of items can be any arbitrary number. 
     In the above embodiment, two types of PLU code data can be designated, and a condition, i.e., an &#34;AND&#34; or &#34;OR&#34; condition of these two types of data can be designated. However, the number of types of PLU code data is not limited to two. Thus, any number of PLU code data and conditions to be satisfied by such PLU code data can be set. For example, it is possible to calculate the number of customers who do not purchase a specific item (NOT), the number of customers who do not purchase one of a plurality of items (NOR), and the number of customers who purchase none of the plurality of items (NAND), and corresponding ratios to the total number of customers. Also, three or more types of PLU code data can be designated. For example, when the number of customers who purchase both of the items having the PLU code data &#34;121&#34; and &#34;113&#34; or the number of customers (rate) who purchase items having the PLU code data &#34;135&#34; to be calculated, the key operations as shown in FIG. 14 are performed. An &#34;AND&#34; key is a key for designating &#34;logic AND,&#34; and an &#34;OR&#34; key is a key for designating &#34;logic OR.&#34; A &#34;START&#34; key is a key for designating a start of processing. The input PLU code data, the logic symbols and the like are sequentially stored in the registers or predetermined memories of the CPU 3. The program processing is started when the &#34;START&#34; key is depressed. A retrieval operation can be performed in the following manner. In the embodiment described above, it is checked if the designated PLU code data, the code data &#34;121,&#34; &#34;113&#34; and &#34;135&#34; in this case are present for each data group bounded by the boundary code data in the PLU code data memory 51, i.e., for each customer. When the designated code data is present, the flag is set in the corresponding register or memory. When the retrieval operation for one customer is completed, it is checked if each flag satisfies the designated condition. When the condition is satisfied, the number of customers is incremented by 1. When the retrieval operation is completed for all the data in the PLU code data memory 51, the control flow advances to printing processing, and the number of customers and the rate of occurrence in the total number of customers are printed. A key designating brackets can also be incorporated in order to designate any condition of a number of code data. 
     The flow charts shown in FIGS. 2A to 2C are only examples and the operation is not limited to them. The flow charts are described hereinabove with reference to wherein the numbers of customers who purchase at least one or both of two items are calculated, as basic examples. However, other types of calculations can be easily performed by combining these basic flow charts. 
     In the above embodiment, when the items sold must be changed or refunded, the corresponding data can be erased from the PLU code data memory 51.

Technology Category: 3