2011/10/24 16:31 -0700, Daevid Vincent
WHERE cs.customer_id = 7
GROUP BY customer_id
Well, the latter line is now redundant.
How will you make the '7' into a parameter?
--
MySQL General Mailing List
For list archives:
I know this is a common problem, and I've been struggling with it for a full
day now but I can't get it.
I also tried a few sites for examples:
http://www.artfulsoftware.com/infotree/queries.php#101
http://forums.devarticles.com/general-sql-development-47/select-max-datetime
-problem-10210.html
-
From: Daevid Vincent [mailto:dae...@daevid.com]
Sent: Monday, October 24, 2011 1:46 PM
To: mysql@lists.mysql.com
Subject: Within-group aggregate query help please - customers and latest
subscription row
I know this is a common problem, and I've been struggling with it for a
full
day now but I
To: mysql@lists.mysql.com
Subject: RE: Within-group aggregate query help please - customers and
latest
subscription row
A kind (and shy) soul replied to me off list and suggested this solution,
however,
this takes 28 seconds (that's for a single customer_id, so this is not
going
to scale).
Got