montypython1
Technical User
Greetings,
What is the best way to create a Trend report using MySql? The following code lists all the individual records, but I would like to total and group the gross payable (using field "grosspybl") amounts within each of the most recent 25 months (based on field "dealdate").
Does it make sense to create 25 new fields called something like "grosspybl_01, grosspybl_02, grosspybl_03, grosspybl_04, ... grosspybl_25" to represent the sale transactions that occurred 1 month back, or 2 months back, ... or 25 months back?
Any suggestions?
Thanks,
Dave
What is the best way to create a Trend report using MySql? The following code lists all the individual records, but I would like to total and group the gross payable (using field "grosspybl") amounts within each of the most recent 25 months (based on field "dealdate").
Code:
[indent]select dealership, dealdate, grosspybl from dmssale order by dealdate desc ;[/indent]
Does it make sense to create 25 new fields called something like "grosspybl_01, grosspybl_02, grosspybl_03, grosspybl_04, ... grosspybl_25" to represent the sale transactions that occurred 1 month back, or 2 months back, ... or 25 months back?
Any suggestions?
Thanks,
Dave