<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: GROUP_CONCAT useful GROUP BY extension</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/</link>
	<description>Percona&#039;s MySQL &#38; InnoDB performance and scalability blog</description>
	<lastBuildDate>Sat, 11 Feb 2012 16:45:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Ron</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/comment-page-1/#comment-863780</link>
		<dc:creator>Ron</dc:creator>
		<pubDate>Sun, 25 Dec 2011 19:19:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/#comment-863780</guid>
		<description>I have a table like
userid   testid         attempts                          grade
  2          1       6,4,9,2,7,5,3,8,1            20,55,56,67,80,66,33,34,52

I want to get the attempts in order like 
userid   testid         attempts                          grade
  2          1       1,2,3,4,5,6,7,8,9           52,67,33,55,66,20,80,34,56
And my query looks like
SELECT li.userid, li.testid, group_concat(li.attempts AS att, group_concat(li.grade) FROM testattempts GROUP BY testid

Could anyone help me with this?</description>
		<content:encoded><![CDATA[<p>I have a table like<br />
userid   testid         attempts                          grade<br />
  2          1       6,4,9,2,7,5,3,8,1            20,55,56,67,80,66,33,34,52</p>
<p>I want to get the attempts in order like<br />
userid   testid         attempts                          grade<br />
  2          1       1,2,3,4,5,6,7,8,9           52,67,33,55,66,20,80,34,56<br />
And my query looks like<br />
SELECT li.userid, li.testid, group_concat(li.attempts AS att, group_concat(li.grade) FROM testattempts GROUP BY testid</p>
<p>Could anyone help me with this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mohammed</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/comment-page-1/#comment-835956</link>
		<dc:creator>mohammed</dc:creator>
		<pubDate>Tue, 01 Nov 2011 17:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/#comment-835956</guid>
		<description>Thank you , Vadim Tkachenko
 i used group_concat in my query but i got i problem 
 problem is


 mysql group_concat limit length is 1024 and i need to increase it   (  i did it )

(
     but is there is problem when i increase group_concat length to more than 1024
)

 it work fine in localhost  , but on the website , i got error -&gt; need more premission to do this</description>
		<content:encoded><![CDATA[<p>Thank you , Vadim Tkachenko<br />
 i used group_concat in my query but i got i problem<br />
 problem is</p>
<p> mysql group_concat limit length is 1024 and i need to increase it   (  i did it )</p>
<p>(<br />
     but is there is problem when i increase group_concat length to more than 1024<br />
)</p>
<p> it work fine in localhost  , but on the website , i got error -&gt; need more premission to do this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Panagiotis</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/comment-page-1/#comment-823506</link>
		<dc:creator>Panagiotis</dc:creator>
		<pubDate>Mon, 19 Sep 2011 06:41:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/#comment-823506</guid>
		<description>Hi, this is a useful tutorial but i need some more help. In my table the column I use the GROUP_CONCAT is a foreign key from another table. So, i have to display PC1,PC2,PC3 for example and no 2,3,4 which are the values of my table. I tried with LEFT JOIN but I didn&#039;t get a result. I&#039;m trying to make an extra query inorder to take those names but  nothing yet. Can you halp me a little bit?</description>
		<content:encoded><![CDATA[<p>Hi, this is a useful tutorial but i need some more help. In my table the column I use the GROUP_CONCAT is a foreign key from another table. So, i have to display PC1,PC2,PC3 for example and no 2,3,4 which are the values of my table. I tried with LEFT JOIN but I didn&#8217;t get a result. I&#8217;m trying to make an extra query inorder to take those names but  nothing yet. Can you halp me a little bit?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Herah</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/comment-page-1/#comment-812576</link>
		<dc:creator>Herah</dc:creator>
		<pubDate>Sun, 14 Aug 2011 14:29:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/#comment-812576</guid>
		<description>Thank you! this really helped alot!</description>
		<content:encoded><![CDATA[<p>Thank you! this really helped alot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: van</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/comment-page-1/#comment-807628</link>
		<dc:creator>van</dc:creator>
		<pubDate>Wed, 27 Jul 2011 18:33:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/#comment-807628</guid>
		<description>@Barbara,

thanks</description>
		<content:encoded><![CDATA[<p>@Barbara,</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maxi</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/comment-page-1/#comment-803576</link>
		<dc:creator>maxi</dc:creator>
		<pubDate>Mon, 04 Apr 2011 14:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/#comment-803576</guid>
		<description>@bhushan .. thank you that resolved a query with bigint values!</description>
		<content:encoded><![CDATA[<p>@bhushan .. thank you that resolved a query with bigint values!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bhushan</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/comment-page-1/#comment-726652</link>
		<dc:creator>bhushan</dc:creator>
		<pubDate>Thu, 18 Feb 2010 09:40:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/#comment-726652</guid>
		<description>thank bosss &quot;@Murz, Jasan &quot;

it work for me..

@Murz, Jasan

Alternatively you can use

CONVERT(group_concat(myInt) USING utf8)</description>
		<content:encoded><![CDATA[<p>thank bosss &#8220;@Murz, Jasan &#8221;</p>
<p>it work for me..</p>
<p>@Murz, Jasan</p>
<p>Alternatively you can use</p>
<p>CONVERT(group_concat(myInt) USING utf8)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: liki05</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/comment-page-1/#comment-675540</link>
		<dc:creator>liki05</dc:creator>
		<pubDate>Wed, 11 Nov 2009 07:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/#comment-675540</guid>
		<description>hi PixelMe.

you can use substring_index(group_concat(column),&#039;,&#039;,2). it will return the first 2 concated values.</description>
		<content:encoded><![CDATA[<p>hi PixelMe.</p>
<p>you can use substring_index(group_concat(column),&#8217;,',2). it will return the first 2 concated values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FunciÃ³n GROUP_CONCAT de MySQL &#124; Otro Blog MÃ¡s</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/comment-page-1/#comment-666620</link>
		<dc:creator>FunciÃ³n GROUP_CONCAT de MySQL &#124; Otro Blog MÃ¡s</dc:creator>
		<pubDate>Mon, 19 Oct 2009 20:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/#comment-666620</guid>
		<description>[...] &#8211; Syntax Error y MySQL Performance Blog (mirar tambiÃ©n los comentarios) Share this on del.icio.usShare this on [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8211; Syntax Error y MySQL Performance Blog (mirar tambiÃ©n los comentarios) Share this on del.icio.usShare this on [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PixelMe</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/comment-page-1/#comment-560525</link>
		<dc:creator>PixelMe</dc:creator>
		<pubDate>Wed, 13 May 2009 19:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/#comment-560525</guid>
		<description>When I am using in GROUP_CONCAT, It will list all the values associated wit the parent ID, But I need only few like limit in ordinary SQL statement. Anybody know how to do this in MySQL qeury?

tblmovies
MovieId     MovieName
1           The Take
2           Fatal Contact
3           Flashbacks of a Fool
4           Teddy Bear
5           Nanking


tblgenres
GenreId     GenreName
1           Action
2           Horror
3           Sci-Fi 
4           Documentary
5           Drama 
6           History 

tblmovie_genres
movieId       GenreId
1             2
1             4
1             5
2             4
4             5
3             5
5             6

When I was selecting the Movie whith Id 1 GROUP_CONCAT will result  Horror,Documentary, Drama ; But I want to get only 2 genres which is Horror,Documentary.

Please somebody help me .

Thanks.</description>
		<content:encoded><![CDATA[<p>When I am using in GROUP_CONCAT, It will list all the values associated wit the parent ID, But I need only few like limit in ordinary SQL statement. Anybody know how to do this in MySQL qeury?</p>
<p>tblmovies<br />
MovieId     MovieName<br />
1           The Take<br />
2           Fatal Contact<br />
3           Flashbacks of a Fool<br />
4           Teddy Bear<br />
5           Nanking</p>
<p>tblgenres<br />
GenreId     GenreName<br />
1           Action<br />
2           Horror<br />
3           Sci-Fi<br />
4           Documentary<br />
5           Drama<br />
6           History </p>
<p>tblmovie_genres<br />
movieId       GenreId<br />
1             2<br />
1             4<br />
1             5<br />
2             4<br />
4             5<br />
3             5<br />
5             6</p>
<p>When I was selecting the Movie whith Id 1 GROUP_CONCAT will result  Horror,Documentary, Drama ; But I want to get only 2 genres which is Horror,Documentary.</p>
<p>Please somebody help me .</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

