mysql 实例
2021/9/10 19:08:40
本文主要是介绍mysql 实例,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
SELECT a.*, FROM_UNIXTIME( a.createTime, '%Y-%m-%d %H:%i:%s' ) AS createTimeStr, FROM_UNIXTIME( a.updateTime, '%Y-%m-%d %H:%i:%s' ) AS updateTimeStr, b.`orgName` AS deptName, c.`realUserName` AS userName, d.`realUserName` AS updateName FROM ( SELECT v.*, ( SELECT COUNT(*) FROM wx_article_info w WHERE w.wxCode = v.wxCode ) AS articleCount FROM wx_base_info v LEFT JOIN sys_users su ON v.`userId` = su.`userId` WHERE 1 = 1 AND v.cityCode LIKE CONCAT('34', '%') AND v.deptCode LIKE concat('34', '%') ) a LEFT JOIN sys_org b ON a.`deptCode` = b.`orgCode` LEFT JOIN sys_users c ON a.`userId` = c.`userId` LEFT JOIN sys_users d ON a.`updateId` = d.`userId` WHERE 1 = 1 ORDER BY a.updateTime DESC, a.articleCount DESC
这篇关于mysql 实例的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-16MySQL资料:新手入门教程
- 2024-11-16MySQL资料:新手入门教程
- 2024-11-15MySQL教程:初学者必备的MySQL数据库入门指南
- 2024-11-15MySQL教程:初学者必看的MySQL入门指南
- 2024-11-04部署MySQL集群项目实战:新手入门教程
- 2024-11-04如何部署MySQL集群资料:新手入门指南
- 2024-11-02MySQL集群项目实战:新手入门指南
- 2024-11-02初学者指南:部署MySQL集群资料
- 2024-11-01部署MySQL集群教程:新手入门指南
- 2024-11-01如何部署MySQL集群:新手入门教程