You know your query is getting a little intense when...
You get this dreaded message:
An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference.
I love how they SHOUT it at you.
Turns out the issue was:
The aggregate in your sub-query is aggregating a column
on the outer query instead
of the inner subquery. Fix it up, dufus.
And yeh, I know they use capitals to indicate reserved words. I don't like it, but yeh, I get it.
Next → ← PreviousMy book "Choose Your First Product" is available now.
It gives you 4 easy steps to find and validate a humble product idea.