select substring(sendtime,1,8) ,count(*) from (select sendtime c from hasms_mo) group by substring(sendtime,1,8) ;为什么不能做?

hotenM 2002-10-02 04:56:24
select substring(sendtime,1,8) ,count(*) from (select sendtime c from hasms_mo) group by substring(sendtime,1,8) ;这个查询不能做

但是
select sendtime ,count(*) from (select sendtime c from hasms_mo) group by sendtime ;

就可以

如果我想达到上面的功能,该怎么写?
...全文
108 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
pado 2002-10-08
  • 打赏
  • 举报
回复
不支持子查询.
shuixin13 2002-10-08
  • 打赏
  • 举报
回复
自己建个临时表吧
shuixin13 2002-10-08
  • 打赏
  • 举报
回复
MySQL???
目前不支持呀
dilettante 2002-10-08
  • 打赏
  • 举报
回复
这样可不可以select substring(sendtime,1,8) as substring,count(*) from (select sendtime c from hasms_mo) group by substring;

57,064

社区成员

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

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