More info. If the tables look like this:

customers
------------------
cust_id
signup_date

orders
------------------
order_id
cust_id
order_date

Then the SQL needs to accomplish something like this:

select * from customers
left join orders on customers.cust_id = orders.cust_id
where signup_date < now() - interval 14 day
and sum(if(order_date > now() - interval 14 day, 1, 0)) = 0

But that gives me "Invalid use of group function".

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to