我遇到的问题是大量基本的,我正在尝试使用以下SQL代码
SELECT *
FROM [Car For Sale]
WHERE CFS_Selling_Price IN (SELECT MAX (CFS_Selling_Price)
FROM [Car For Sale]
HAVING CFS_Status ='Sold');
已经与以下SQL代码一起使用
CFS_Sold_Date > dateadd("m",-1,date())
为了减少从最昂贵的汽车销售到本月销售的最昂贵的汽车的结果。我已经尝试过为自己搞清楚无人能帮忙吗?
答案 0 :(得分:1)
你的意思是:
SELECT *
FROM [Car For Sale]
WHERE CFS_Selling_Price IN
(SELECT MAX (CFS_Selling_Price)
FROM [Car For Sale]
WHERE CFS_Status ='Sold'
AND CFS_Sold_Date > dateadd("m",-1,date()));