Home > database >  About the consumption of the number of statistics
About the consumption of the number of statistics

Time:09-29

Often users have this need, A merchant have 1, 2, 3, three POS machine, merchants have 4 B, 5 two POS, now users each merchant to statistics, how many people are there in each POS terminals in the consumer, in A statement the statistics for each number of POS consumption, the consumption of each merchant number, number of total consumption, etc.,
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 statistics

CodePudding 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 name
2. 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
  • Related