How to apply GROUP_CONCAT in mysql Query

Posted by Query Master on Stack Overflow See other posts from Stack Overflow or by Query Master
Published on 2012-06-27T14:49:27Z Indexed on 2012/06/27 15:16 UTC
Read the original article Hit count: 196

Filed under:
|
|
|

How to apply GROUP_CONCAT in this Query if you guys have any idea or any alternate solution about this please share me. Helps are definitely appreciated also (see Query or result required)

Query

SELECT WEEK(cpd.added_date) AS week_no,COUNT(cpd.result) AS death_count
FROM cron_players_data cpd WHERE cpd.player_id = 81
AND cpd.result = 2 AND cpd.status = 1
GROUP BY WEEK(cpd.added_date);

Query output result screen

enter image description here

Result Required

23,24,25 AS week_no 2,3,1 AS death_count  

© Stack Overflow or respective owner

Related posts about mysql

Related posts about sql