ok here is the situation im writing a management script for a virtual airline and i need the fleet page to get all the aircraft info from the aircraft database:
| ID | Type | Reg | Hours |
|001| 747 | G-BSPK| 10.23 |
|002| 747 | G-BSPL| 59.00 |
|003| 737 | G-BSPM| 19.03 |
|004| 737 | G-BSPN| 00.00 |
|005| 747 | G-BSFK| 210.23|
|006| 767 | G-BSGK| 10.23 |
I need a script to count the number of a certain type of aircraft and total the hours for that type of aircraft.
so it is outputed on a table like so:
|Aircraft Type | Total Hours | No. In Fleet |
| 737 | 19.03 | 2 |
| 747 | 279.46 | 3 |
| 767 | 10.23 | 1 |
i know how to count the number of records im just not sure how to total all of the hours for each aircraft type?