作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
monthName year total
August 2014 10000
July 2014 20000
June 2014 56400
October 2015 20000
September 2014 23400
September 2015 10000
我想按如下所示的月份和年份顺序对以上数据进行排序
monthName year total
June 2014 56400
July 2014 20000
August 2014 10000
September 2014 23400
September 2015 10000
Octomber 2015 20000
顺序(一月、二月、三月这样以及2014年和2015年的数据)
我使用以下查询作为
从图表绘制组中选择 * 按月份名称
但我很喜欢
monthName year total
August 2014 10000
July 2014 20000
June 2014 56400
October 2015 20000
September 2014 23400
你能帮我解决这个问题吗?
最佳答案
SELECT * FROM chartdraw ORDER BY DATEPART(MM, concat_ws(" ",monthname,year,01))
关于php - SQL查询: Order In month,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25439572/
我是一名优秀的程序员,十分优秀!