Question

 Display the mechanic name along with the total number of vehicles serviced by each mechanic.

08 Aug 2026
Answer :
Word Count : 876
In a database system used by a vehicle service centre, the information about mechanics and the vehicles serviced by them is generally stored in related tables. To display the mechanic name along with the total number of vehicles serviced by each mechanic, SQL aggregate functions can be used with the `GROUP BY` clause. The `COUNT()` function is particularly useful because it counts the number of records associated with each mechanic. Suppose the database contains two tables: `Mechanic` and `Vehicle`. The `Mechanic` table may contain attributes such as `Mechanic_ID` and `Mechanic_Name`, while the `Vehicle` table may contain `Vehicle_ID`, `Vehicle_Number`, and `Mechanic_ID`. The `Mechanic_ID` acts as a common attribute and establishes a relationship between the two tables. A suitable SQL query is: ```sql SELECT m.Mechanic_Name, COUNT(v.Vehicle_ID) AS Total_Vehicles_Serviced FROM Mechanic m JOIN Vehicle v ON m.Mechanic_ID = v.Mechanic_ID GROUP BY m.Mechanic_Name; ``` Here, `m` and `v` are aliases for the `Mechanic` and `Vehicle` tables respectively. The `JOIN` operation combines records from both tables where the `Mechanic_ID` in the two tables is the same. This allows the database _____ _________ ____ _________ ___ _________ _______ ____.
______ _______ ____ ____ ________ ____ ___ _____ ________.
_______ ______ ________ ___ ____ ___ ________ __________ ___ __________ ____.
______ ____ _________ ______ ______ _____ ________.
_____ _________ __________ _______ ________ ____ ___.
_________ _____ ________ ___ _____ ____ ________ _____ ______ _______ __________.
_______ ______ ____ _____ ____ ___ ___ _________ ______ ______.
_____ _____ ______ __________ _____ _________ ________ __________ ________ ________.
______ ______ _____ ____ ___ ______ ___.
________ ________ _________ _____ ______ _________ __________ ____ ____ _________.
_____ _____ __________ __________ _____ _________ _________.
__________ ___ ____ ___ ____ _____ ______ __________ ___.
____ _________ ________ __________ ___ _____ ___.
______ ___ ________ _________ __________ ___ ____ _______.
__________ _________ __________ ______ ____ _________ ___ _____.
__________ ______ __________ ________ _________ __________ ________ ______ ________ ________ __________ _________.
____ _______ _________ ____ _______ _______.
___ __________ _____ ___ _____ __________ _____ ___ ________ ______.
_______ ____ _______ _____ _________ _______.
_______ _________ _______ _______ ____ ______ ______ _____ _______ _____ _________.
_____ ________ ____ _________ _________.
________ _______ ___ __________ __________ _________ _______ _______ ________ ___ ___ _________.
_________ __________ _________ ______ ___ _______ ___ __________ ________ ________ ________.
_________ ___ _________ ________ ________ ____ ____ ____ ______ ____ ____ __________.
__________ ______ ____ ______ ____ ______ ______.
___ _____ ___ ________ ____.
______ ____ ____ ______ __________ _____ _____ __________ _____ ______.
____ ________ ______ ___ ___ ________.
_____ _______ ____ __________ ___ __________ _____ ________ ___ _________ _______ ___.
___ ______ ___ ______ _________ ______ _________ __________.
_____ ______ _______ _______ _______ _________.
________ _______ __________ __________ ______ ________ _________ ______ ________.
____ ________ _________ ________ _________ ______ _____ __________ ______ ________ _________.
___ _____ ____ _____ ____ ____ ___ _________.
_________ ________ __________ _______ ______ ______ ___ ______ __________ ________.
_________ ______ _______ ____ ___ ______ __________ ______ ______ _____.
________ ________ ______ _______ __________ ______.
_________ ________ _________ ___ __________ ___ _______ _______ ___.
_________ ______ ___ ________ _________ _____ ____ ___ ___ ______ _________ ________.
_____ _________ ________ ____ ______ ________ ___ __________ ________.
______ ________ ________ _____ __________ ___.
_______ _________ ________ ________ _________ ___ ______ _______.
___ ________ ____ _________ ________ _________.
_______ ________ ______ ______ __________ __________ ________ __________ _________ _______.
_________ _________ _______ ____ ___ _________.
________ _________ _________ ___ ________ ___ ____ _______ __________ ___ _________.
_____ _________ _____ ____ ________ ___ _____ __________.
_______ ___ _______ ___ _______.
_________ ________ ___ ____ __________ _______ ________ __________ ___ __________ _______ ___.
____ _______ ________ ___ ____ _________ _______ _______ ________ _______.
_______ ____ _______ _________ ___ _______ _____ ____ ___.
______ ____ ___ ______ _________ ___ _____ ______ _______ ___ _________.
__________ ____ _____ _____ ____ __________ ______ ___.
_______ _______ ______ _______ __________ ________ ____ _____.
_______ ____ _________ ___ _______ ___ ________ ________ _____ ______ ________.
_____ _________ ________ ______ _____ _______ _________ ______.
_____ ____ ____ ____ ____ ____.
_____ ____ _____ ____ ________ ______ ________ ______ _________.
___ ___ _________ _____ ___ ______ ___ __________ _______ ______.
_______ _____ ___ _________ __________ ______ _______ _______ ________ ________.
______ ____ ___ ___ ___ ______ _________ ________.
___ _____ _________ _____ ___ ______ __________ ___ ____ _____ __________.
__________ _________ _________ ___ ________ _____ _____ ___ __________ _____ ____.
_____ __________ __________ _________ _________ _________ __________ ____ __________ _____ ____.
_________ ___ ___ _____ _____ ______ _______ _______ _____.
__________ _________ ______ __________ ___ ____.
_______ ______ ____ ____ _____ ______ ____ ____ _________.
__________ __________ __________ ______ ____ _____ ______ _____ ______ _________.
______ ______ ____ _________ ______ ______ ____ _________.
____ _____ ______ _______ ________ ________ ___ _______.
______ _________ __________ _______ ______ ________ _________ _________ __________ ______ _____ ________.
__________ ___ _____ ______ _______ ________ ____ ______ _________ _____.
_______ ___ ________ ________ ________ _________.
_____ _______ ______ _____ _____ _____ ___ _______.
_____ _______ _____ _______ _____ ______ ________ _____ __________ _____ ________ _________.
______ ____ _______ _______ ____ ________ __________ __________ __________ _________ ___.
____ __________ ____ ____ ____ ___ __________.
____ ______ _________ _______ _____ ______ __________ ______ ____.
________ _________ _______ ______ ________ ______.
___ ___ __________ ________ _______.
Get Full Answer on WhatsApp
IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance  Display the mechanic name along with the total number of vehicle
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→