MSSQL 语句转 MYSQL 求帮忙

yejian520 2016-03-18 12:11:07
以前一直用MSSQL,现在转到MYSQL,版本是5.6.29

请热心人帮我转一条SQL语句

select SUM(Vendite_List.TotRighe) as vq,convert(varchar(10),Vendite_List.Data,120) as rq from Vendite_List where Vendite_List.DATA between '2016-02-26 00:00:00' and '2016-03-17 23:59:59' group by convert(varchar(10),Vendite_List.Data,120) order by rq

怎么转成MYSQL?
...全文
144 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
weishaolin13x 2016-03-18
  • 打赏
  • 举报
回复
mysql的日期类型 支持 到 微秒,所以要 dite_List.DATA between '2016-02-26 00:00:00' and '2016-03-17 23:59:59.999' 日期格式化 date_format(a.CreateTime,'%Y-%m-%d') as name
ACMAIN_CHM 2016-03-18
  • 打赏
  • 举报
回复
select SUM(Vendite_List.TotRighe) as vq,date_format(Data,'%Y-%m-%d') as rq from Vendite_List where Vendite_List.DATA between '2016-02-26 00:00:00' and '2016-03-17 23:59:59' group by date_format(Data,'%Y-%m-%d')

56,687

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧