Why does a group_concat on a join change aggregate values?

2015-05-07 Thread Paul Halliday
Fighting a bit with this one... If I do something like (pseudo): SELECT count(val) AS n, GROUP_CONCAT(types) AS c_types FROM tbl1 returns something like: n c_types 1 t9 when I add a left join though: SELECT count(val) AS n, GROUP_CONCAT(types) AS c_types, GROUP_CONCAT(two.types) AS d_types

Re: create_time

2015-05-07 Thread Jan Steinman
On 2015-05-07, at 07:17, mysql-digest-h...@lists.mysql.com wrote: > I have, however, also had Martin's experience where create_time seemed > improbable. Sigh. I have the same thought every evening, when I look over all the things I planned to do during the day... Compared to sitting in an

Re: Why does a group_concat on a join change aggregate values?

2015-05-07 Thread shawn l.green
Hi Paul, On 5/7/2015 10:17 AM, Paul Halliday wrote: Fighting a bit with this one... If I do something like (pseudo): SELECT count(val) AS n, GROUP_CONCAT(types) AS c_types FROM tbl1 returns something like: n c_types 1 t9 when I add a left join though: SELECT count(val) AS n, GROUP_CONCAT(

Re: Why does a group_concat on a join change aggregate values?

2015-05-07 Thread Bob Eby
First, have you tried GROUP_CONCAT(DISTINCT types) ? Second I see my counts rise just as my group_concat() terms when I do something similar to what you're talking about. Also, here: val c_types d_types 3t9,t9,t9 a2,a3,a9 Your column headers don't seem to match your query.

Re: Why does a group_concat on a join change aggregate values?

2015-05-07 Thread Paul Halliday
Should have showed the whole thing. Take a look here (click image to see full output): http://www.pintumbler.org/tmp On Thu, May 7, 2015 at 4:11 PM, shawn l.green wrote: > Hi Paul, > > On 5/7/2015 10:17 AM, Paul Halliday wrote: > >> Fighting a bit with this one... >> >> If I do something like (