Please help....if it's even possible 
I need to know what customers had maintenance but no longer do.
I have my query working correct but I don't know the next step. Currently I have a query which searches for a specific product, tells me the purchase date as well as when their maintenance ends. I also have an expression which looks at the maintenance end date and tells me whether they are current on their maintenance or not. Pretty simple. Here's the rub.
There are many many customers who have made purchases over the years. The query may return 5 or more lines for each customer with a 'No' in the 'Current' field and then one 'Yes' for the current year. Some customers have all 'No' for their purchases since they decided not to renew their maintenance. I can't just look at the current purchase year since some customers purchased maintenance many years in advance and may still be current (or not).
I only want the second 123 customer. The other customers are either too old (expired) or have maintenance (current).
What is the easiest or best way to find out who had maintenance but currently does not? Or another way, how do I remove the old purchases (expired) and only look at the current ones to see if they have maintenance. The problem is I need to know if they had maintenance earlier to compare if it still 'current'.
Manually I would remove all the expired records (those over 1 year old) then look to see if their maintenance expired this year. If it did, did they renew? If not, put it in a table. If so, go to the next records and repeat.
Does that make sense?
I need to know what customers had maintenance but no longer do.
I have my query working correct but I don't know the next step. Currently I have a query which searches for a specific product, tells me the purchase date as well as when their maintenance ends. I also have an expression which looks at the maintenance end date and tells me whether they are current on their maintenance or not. Pretty simple. Here's the rub.
There are many many customers who have made purchases over the years. The query may return 5 or more lines for each customer with a 'No' in the 'Current' field and then one 'Yes' for the current year. Some customers have all 'No' for their purchases since they decided not to renew their maintenance. I can't just look at the current purchase year since some customers purchased maintenance many years in advance and may still be current (or not).
Code:
Customer PurchaseDate MaintenanceDate Current
ABC 2005 2006 No
ABC 2006 2009 Yes
123 2007 2008 No
123 2008 2009 No
WXY 2008 2009 Yes
456 2006 2007 No
What is the easiest or best way to find out who had maintenance but currently does not? Or another way, how do I remove the old purchases (expired) and only look at the current ones to see if they have maintenance. The problem is I need to know if they had maintenance earlier to compare if it still 'current'.
Manually I would remove all the expired records (those over 1 year old) then look to see if their maintenance expired this year. If it did, did they renew? If not, put it in a table. If so, go to the next records and repeat.
Does that make sense?