我有一个预订名单,其中两个相同的汽车可以列出,但我只想显示一个,而不是最新的,我想早名单。
我是怎么做到的?
SELECT
booking.id,
cars.name,
cars.cover as image,
car_details.mark,
client.surname,
client.lastname,
booking_car_status.booking_id as booking_car_status_id
FROM booking
INNER JOIN cars
ON booking.car_id = cars.id
INNER JOIN car_details
ON car_details.car_id = cars.id
INNER JOIN client
ON client.id = booking.client_id
LEFT JOIN booking_car_status
ON booking_car_status.booking_id = booking.id
LEFT JOIN booking_signature
ON booking_signature.booking_id = booking.id
WHERE (booking_car_status.booking_id IS NULL) AND (booking.from_date::date <= NOW()) ORDER BY booking.id ASC
1条答案
按热度按时间kqqjbcuj1#
我认为 www.example.com 是表示汽车的独特性和你想拥有的最早的 www.example.com 辆车的com