Reputation: 13
The issue I am having is massively basic all I'm trying to do it use the following SQL code
SELECT *
FROM [Car For Sale]
WHERE CFS_Selling_Price IN (SELECT MAX (CFS_Selling_Price)
FROM [Car For Sale]
HAVING CFS_Status ='Sold');
which works already along with the following SQL code
CFS_Sold_Date > dateadd("m",-1,date())
in order to reduce the results from the most expensive car sold to the most expensive car sold this month. I've tried figuring it out for myself to no avail anyone able to help ?
Upvotes: 1
Views: 66
Reputation: 91376
Do you mean:
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()));
Upvotes: 1