gpt4 book ai didi

mysql - SQL 查找库存中最旧的汽车

转载 作者:行者123 更新时间:2023-11-30 00:24:22 25 4
gpt4 key购买 nike

好的,我有以下表格和字段:

cars(carReg,regYear,Model,Manufacturer)
manufacturers (manufacturerId, Name, Country, Contat)

例如,我如何获得 Select 语句来查找制造商“福特”库存中最旧的汽车?

最佳答案

select cars.*
from cars
join manufacturers on manufacturers.manufacturerId = cars.manufacturer
where manufacturers.Name = 'Ford'
order by cars.regYear asc
limit 1

关于mysql - SQL 查找库存中最旧的汽车,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22995309/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com