
用sql语句写出:查询一周内发布消息最多的6个人的姓名及数量 20
*************************************************************************************...
*******************************************************************************************************
我写了一个不知道是不是正确:
mysql语句:
select user.name ,count(*) from user,info where user.id =info.userid and (getdata()-FROM_UNIXTIME(modtime,‘%Y%M%d'))<=7 order by count(user.id)=6 asc;
select user.name ,count(*) from user,info where user.id =info.userid and (getdata()-FROM_UNIXTIME(modtime,‘%Y%M%d'))<=7 and count(user.id)=6 order by count(*) ; 展开
我写了一个不知道是不是正确:
mysql语句:
select user.name ,count(*) from user,info where user.id =info.userid and (getdata()-FROM_UNIXTIME(modtime,‘%Y%M%d'))<=7 order by count(user.id)=6 asc;
select user.name ,count(*) from user,info where user.id =info.userid and (getdata()-FROM_UNIXTIME(modtime,‘%Y%M%d'))<=7 and count(user.id)=6 order by count(*) ; 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏20(财富值+成长值)
若以下回答无法解决问题,邀请你更新回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询