Thanks. I added orders.order_date to the list of fields being
selected, but it still returns "invalid use of group function".
On Nov 3, 2009, at 1:09 PM, Martin Gainty wrote:
any column used in any group functions such as SUM needs to be
requested in select column e.g.
select foo from table where sum(foo)=1.00
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