Home > database >  MySQL custom in the quarter, and the data accumulation
MySQL custom in the quarter, and the data accumulation

Time:01-15

Single table calculation according to the order date (orderTime), calculate the quarter, a total of four quarters, quarterly value calculate the
- Q1 quarter 1-3 months
1 - June - Q2 quarter
September - Q3 quarter 1 -
1 - December - Q4 quarterly
Data calculation is accumulative, how to do it in MySQL queries, hope dong who answer

The style of the export is as follows:
Pharmacy pharmacy coding region provinces city name number 2020 Q2-2020 Q2 - patients bottle

Quarter is dynamic: 2020 Q2 - DOT number 2020 Q3-2020 Q3 - patients bottles of 2020 Q3 - DOT and statistical number
  • Related