New here and New to coding. I am tring to create a query statement for this to find out the model of the car that was the first car reserved (i.e., it has the earliest reservation date and time)?
Here is the model i am working with
and there is my code. I am thinking i shouldnt order by reservation time. I need your thoughts.
SELECT carid, carmodel
FROM car
JOIN reservation ON reservation.cari d =car.carid
WHERE resvbegdate= (
SELECT carid, MIN(resvbegdate)
FROM reservation
GROUP BY carid
ORDER BY resvbegtime
);
Thank you!