Forum Discussion
amasikonde
Jul 14, 2020Copper Contributor
Help with MS Access query to return Brand sold 1 year after purchase date
I'm having problem writing a query to return Brands of vehicles sold in less than 1 year from the purchase date. The data I'm using is as shown below. Brand Price Body Mileage EngineV Engine...
- Jul 14, 2020
amasikonde
Is this what you want?
George Hepworth
Jul 14, 2020Steel Contributor
amasikonde What do you actually want to see as "brand sold"? A count of each brand? A simple list of unique brands? Or....?
amasikonde
Jul 14, 2020Copper Contributor
I would love the query to return the brand name, price, and the date sold
- George HepworthJul 14, 2020Steel Contributor
amasikonde
Is this what you want?- amasikondeJul 14, 2020Copper Contributor
Thank you so much that worked. I am very new when it comes to Access, and I have to use it for now. Is it possible to use the same approach to get data of vehicles less than six months after purchase date? George Hepworth
- George HepworthJul 15, 2020Steel Contributor
Absolutely, the DateAdd() function can be used with a wide variety of arguments, from minutes to years. To do the same thing with a 6-month time frame, you can change the "yyyy" to "m" and the -1 to -6 and so on.