MySQL Forums
Forum List  »  General

Re: Left join in subquery producing strange results
Posted by: Peter Brawley
Date: February 19, 2014 11:05AM

I can't make sense of SELECTing AVG() against a left join without a non-aggregating SELECT expression.

Nor of the LEFT JOIN that specifies just one side of the JOIN.

r.created BETWEEN '2012-01-08' AND '2012-01-08 23:59:59' would be simpler as '2012-01-08'=Date(r.created)

The outer query does not aggregate; what are you trying to accomplish with GROUP BY?

Consider posting the query requirement in plain English; I don't think your SQL means what you think it means.

Options: ReplyQuote


Subject
Written By
Posted
Re: Left join in subquery producing strange results
February 19, 2014 11:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.