As you seen the image below, the month is now 1 and 2. How can I convert it to 1 to Jan, 2 to Feb and so on. Below are my sql.
Help will be appreciate. Thanks in advance! :)
SELECT DISTINCT fbmenuname,
Sum(quantity) AS ordercount,
Month(Str_to_date(date, '%d/%m/%Y')) AS month
FROM fb.fborders
INNER JOIN fb.fbmenu
ON fborders.fbmenuid = fbmenu.fbmenuid
INNER JOIN fb.fbrestaurant
ON fbrestaurant.fbrestaurantid = fbmenu.fbrestaurantid
WHERE fborders.status = 'completed'
AND ( Year(Str_to_date(date, '%d/%m/%Y')) = '2013'
AND fbrestaurant.fbrestaurantid = 'R0001' )
GROUP BY fbmenuname,
Month(Str_to_date(date, '%d/%m/%Y'))
As stated in this other answer:
Use
Left
Function to Trim the unwanted characterSo try this
FIDDLE