Completed
Incomplete
Not Attended
Completed
Incomplete
Not Attended
Phoenix Gym maintains a detailed inventory of all gym equipment, including
equipment ID, name, category, quantity, and last maintenance date. The gym manager seeks
to identify equipment due for maintenance, calculate total quantity per category, update stock
after new purchases, and determine which equipment has the maximum quantity to optimize
floor space and usage. Your role is to write SQL queries that provide actionable inventory
insights and help manage gym resources efficiently.
List equipment last maintained before June 2025, to identify items needing urgent maintenance.
Calculate the total quantity of equipment per category.
Update the quantity of Treadmill by 3 after new purchases and display the updated row
| equipment_id | equipment_name | category | quantity | last_maintenance |
|---|---|---|---|---|
| 1 | Treadmill | Cardio | 5 | 2025-05-10 |
| 2 | Dumbbell | Strength | 20 | 2025-06-15 |
| 3 | Stationary Bike | Cardio | 7 | 2025-07-01 |
| 4 | Bench Press | Strength | 4 | 2025-04-20 |
| 5 | Yoga Mat | Flexibility | 15 | 2025-07-10 |
