Database: vehicle_rent
Question: What are the names and total rental hours 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