Task 2(c) Operating hours of planes

Task Description:

For every plane, list its type, serial number and operating hours. Operating hours must be returned in a column called operating hours. The operating hours are computed by calculating the difference between today and the purschase date of the respective plane. Use a standard date function to calculate the difference and return your result as integer. Finally, sort your list by operating hours. 


Plane
typeserial_numberpurchase_dateflight_hours
A-340198726302003-11-1373725
A-340844693082005-02-1469195
A-3401826409762008-01-0148385
A-380964618362010-05-0724768
Boeing 777846298472007-09-1248365
TRIDENT339621642000-04-2297462
TRIDENT849276652000-01-31104873


Your Result: