I here example is simple, the actual demand for more than two merchants, pos machine quantity are many, and user statistics scope of time may be one day, a month, a year or at any time,
Because is cannot make the total number, i.e., 1 POS have 3 personal consumption, 2 POS one personal consumption, 3 POS 2 personal consumption, but A merchant may be three, the total number of consumption could be 6, may also be A four, five, because people have consumption in different POS
When everyone to meet this need is how to deal with?
CodePudding user response:
Use the card number, statistical people? Number sense can't statisticsCodePudding user response:
1. POS have a corresponding credit card number;2. The card number corresponding to the people;
3. According to the number of POS card number, when the count by person to statistics (need to filter the repeat, avoid more than one card), and so on, according to the merchants, the number of people need such statistics
CodePudding user response:
1. The customer information table is given priority to with card number keys, have the same name2. Merchants table is given priority to with merchant ID key
3. POS table is given priority to with POS ID key
4. The list is given priority to with automatic number ID key, contains field POSID, merchant ID, card number, date, etc.,
Such statistics flexible