Dates

  • Thread starter DebB-Lost in Oregon :)
  • Start date
D

DebB-Lost in Oregon :)

I am trying to write a query that will return the last four dates a customer
has visited me. The database I am working with does not assign trip numbers
so all I have to work with are the actual dates of the visits. How can I get
it to return the last four trips for all of my customers when each person's
actual visit dates will be unique? My mind kept going back to using a date
range, but because everyones last four visits are different, that won't work.
(For example: Fred visits me four times in one week while Wilma visits me
four times in one month. So if I were to query the last month, I would get
Wilma's last four visits, but it would return 16 visits for Fred instead of
the four I am going after.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top