mysql查询员工上月绩效_MySQL查询本周、上周、本月、上个月份数据的sql代码(转)...

更新时间:2023-06-29 20:30:24 阅读: 评论:0

mysql查询员⼯上⽉绩效_MySQL查询本周、上周、本⽉、上
个⽉份数据的sql代码(转)...
------------------------------------------------------------------------------
MySQL查询的⽅式很多,下⾯为您介绍的MySQL查询实现的是查询本周、上周、本⽉、上个⽉份的数据,如果您对MySQL查询⽅⾯感兴趣的话,不妨⼀看
六角恐龙>spa怎么做查询当前这周的数据
SELECT name,submittime FROM enterpri WHERE YEARWEEK(date_format(submittime,'%Y-%m-%d')) =
YEARWEEK(now());
查询上周的数据SELECT name,submittime FROM enterpri WHERE YEARWEEK(date_format(submittime,'%Y-%m-%d')) = YEARWEEK(now())-1;
查询当前⽉份的数据lect name,submittime from enterpri where date_format(submittime,'%Y-%m')=date_format(now(),'%Y-%m')
蟹爪兰花
查询距离当前现在6个⽉的数据
lect name,submittime from enterpri where submittime between date_sub(now(),interval 6 month) and now();
查询上个⽉的数据
开塞露说明书lect name,submittime from enterpri where date_format(submittime,'%Y-%m')=date_format(DATE_SUB(curdate(), INTERVAL 1 MONTH),'%Y-%m')
脑瘤是怎么形成的隔离霜排行榜前十名的牌子lect * from `ur` where DATE_FORMAT(pudate,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m') ;
灰色关联分析法
lect * from ur where WEEKOFYEAR(FROM_UNIXTIME(pudate,'%y-%m-%d')) = WEEKOFYEAR(now())
lect *
竹鸡养殖from ur
where MONTH(FROM_UNIXTIME(pudate,'%y-%m-%d')) = MONTH(now())
lect *
from [ur]
where YEAR(FROM_UNIXTIME(pudate,'%y-%m-%d')) = YEAR(now())
and MONTH(FROM_UNIXTIME(pudate,'%y-%m-%d')) = MONTH(now())
lect *
from [ur]
where pudate between 上⽉最后⼀天
and 下⽉第⼀天

本文发布于:2023-06-29 20:30:24,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1068906.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:查询   数据   灰色   脑瘤   牌子
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图