Hi! Once again I come with my questions to this great forum!
I have two tables, Customer and Time. Everytime a customer places an order, the time and customer gets registered.
Now, I want to select all customers that have either placed an order more than one year back (>365) or never placed an order (null). But IF they have placed an order between today and one year back, they should not be selected.
I have managed to create a query that covers half om what I want to do, selecting customers with an order that are older than one year or never placed an order.
Here is my code so far:
SELECT DISTINCT Customer.CustomerID, Nz([Time.Tid],"NEVER") AS Last_order
FROM Customer LEFT JOIN Time ON Customer.CustomerID = Time.CustomerID
WHERE (((Time.Tid)<(Now()-365) Or (Time.Tid) Is Null));
How can I filter out the customers that have placed an order since then? The reason I want to do this is to be able to list these customers as "old".
Thanks in advance!