Justin:
Interesting. So, if "GROUP BY t1.email" doesn't group simply by t1.email, then how would the query be written to accomplish that? And how is it occurring that Aaron is implicitly grouping by email, first, last instead of just grouping by email? Is it because of the ORDER BY clause?
Wes
On Jul 13, 2004, at 2:13 PM, Justin Swanhart wrote:
You are doing an implicit group by of first, last as well as your explicit group by of email.
So you could have two records with the same e-mail address generate two records with your group by
Justin Time [EMAIL PROTECTED] Justin Credible [EMAIL PROTECTED] --DUPE--
Case differences between the records could also cause dupes. If case differences are causing it then do
select lower(first), lower(last), lower(email) ... group by lower(first), lower(last), lower(email)
--- Wesley Furgiuele <[EMAIL PROTECTED]> wrote:http://lists.mysql.com/[EMAIL PROTECTED]What type of field is the email field?
Wes
On Jul 13, 2004, at 11:04 AM, Aaron Wolski wrote:
t2.cart_id=t3.cart_idHey all,
Got this query:
SELECT first,last,email FROM CustomerTable AS t1, OrderTable AS t2, CartTable AS t3 WHEREAND t1.id=t2.customer_index AND t3.submitted='1'ANDthe email addresses.t3.product_index='1' AND t3.quantity>0 GROUP BY t1.email ORDER BY t1.first,t1.last
For some strange reason it doesn't seem to groupI'd be hard pressed to find every occurrence outof 1000 records, but IDID quickly spot two exact same records whichmeans the email addresswas not grouped.
What can I do or where did I go wrong?
Thanks!
Aaron
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]