MySQL select date to date

About MySQL select date to date I have datatable

TABLE A

ID | DATE
-----------------
1  | 2012-01-01
2  | 2012-01-12
3  | 2012-01-20
4  | 2012-02-03
5  | 2012-02-13
6  | 2012-02-14
7  | 2012-04-05

I want to show like this . And I want use Only MySQL .

 DATE
--------------------
 01,12,20 Jan 2012
 03,13,14 Fab 2012
 05 Apr 2012

OR

 DATE
--------------------
 01-01-2012,12-01-2012,20-01-2012
 03-02-2012,13-02-2012,14-02-2012 
 05-03-2012

Thank you

Answers


For the second form, you could combine GROUP_CONCAT() and GROUP BY:

SELECT   DATE_FORMAT(`DATE`, '%b %Y') AS Month
  ,      GROUP_CONCAT(`DATE`)         AS Dates
FROM     `table`
GROUP BY Month

For the first form, you can use DAY() within GROUP_CONCAT():

SELECT   DATE_FORMAT(`DATE`, '%b %Y') AS Month
  ,      GROUP_CONCAT(DAY(`DATE`))    AS Dates
FROM     `table`
GROUP BY Month

Need Your Help

ZBar - QR Code Scanner, crashing in Android Studio

android qr-code zbar-sdk zbar

I have downloaded from git latest zBar QR Code Scanner (SDK 0.2). I am trying to implement it in my application. I work on Android Studio.