bike_number column from the Bikes table.MAX function to find the latest end_time for each bike_number.bike_number to ensure that each bike is listed only once with its most recent use.end_time in descending order to list the most recently used bikes first.bike_number and the corresponding end_time.
erDiagram
BIKES {
int ride_id PK "Unique ride identifier"
varchar bike_number "Bike's unique number"
datetime start_time "Start time of the ride"
datetime end_time "End time of the ride"
}