Database: vehicle_rent
Question: Show the name and total hours of renting for each vehicle.
SQL:
SELECT T2.name ,  sum(T1.total_hours) FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id  =  T2.id GROUP BY T2.id