I need to print the select values in just one column, here the data:
mysql> select DATE_FORMAT(STR_TO_DATE(items.date, '%Y-%m-%d'), '%M %d, %Y') date_new, unit, Descpt, p_cost, add_by, GROUP_CONCAT(color,' = ',qty) as COLOR, SUM(qty) as Total, SUM(qty) * p_cost as Ptotal from items where status IN ('1','2') Group By Descpt;
+---------------+------+------------------------+--------+--------+------- ------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --+-------+--------+
| date_new | unit | Descpt | p_cost | add_by | COLOR | Total | Ptotal |
+---------------+------+------------------------+--------+--------+---- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -----+-------+--------+
| June 16, 2016 | Pcs | #1688N - Big Crate New | 125.00 | Psd | BLUE - W = 200,BLUE - W/O = 400,RED - W/O = 300,RED - W = 500,GREEN - W = 366,GREEN - W/O = 278,YELLOW - W = 472,YELLOW - W/O = 582,BLACK - W = 255,BLACK - W/O = 330 | 3683 | 460375 |
+---------------+------+------------------------+--------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+--------+
Like this sample: