A confused, urgent for bosses to reassure
CodePudding user response:
Think the statistics to write what you bai, it wasn't a standardWhat do you want to statistical time write shopping date/time, we would like to write a gender statistics of gender, want to statistics professional will save
Have any statistics page browsing time, shopping related what
This kind of problem, should be market researchers asked what kind of information, product to consider how to obtain this information, program realization for
You is which
CodePudding user response:
Customer isPeriod of age and gender in product sales,,,,,,,,
CodePudding user response:
Form design: SchemaTime name, age and gender area address product name products quantity price amount payment,,,,
According to the age of statistical per capita consumption ability
Select 20 years old the following, per capita consumption ability=case count (*) & gt; 0 then the sum (amount)/count (*) the else 0 end from the Schema where age & lt;=20
Select 20 to 30 years old, and per capita consumption ability=case count (*) & gt; 0 then the sum (amount)/count (*) the else 0 end from the Schema where age & gt; 20 and age & lt;=30
The select 30 to 40 years old, and per capita consumption ability=case count (*) & gt; 0 then the sum (amount)/count (*) the else 0 end from the Schema where age & gt; 30 and age & lt;=40
According to the payment statistics
Select payment method and amount=sum (amount) from Schema group by payment