I have to create driver reports in MySQL and was wondering if it is possible to a create query that has headers and footers for each driver. Notice the footer is just a sum of the records above it but still has a label such as "Completed:"
Asked
Active
Viewed 115 times
0
-
Can you explain a little more - by footer do you mean the values at the bottom: Completed Trips (2), 27.60,0,27.60? – Gratus D. Jun 23 '17 at 21:34
-
It's difficult to do this in MySQL. Do it in your application programming language. – Barmar Jun 23 '17 at 22:31
-
See http://stackoverflow.com/questions/27575562/how-can-i-list-has-same-id-data-with-while-loop-in-php/27575685#27575685 for an example of how to do it in PHP. – Barmar Jun 23 '17 at 22:32
-
@GratusD. Yes that is what I mean by footer. And Header is the row that says 'Provider Name, 'Week Ending', 'Driver's Name', and 'Vehicle ID.' – Allaine Dela Cruz Jun 25 '17 at 22:39