![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
jzb_2016
java 程序员
展开
-
mysql 分组排序
select r.* from (select if(@pdept=h.postdate,@rank:=@rank+1,@rank:=1) as rank,@pdept:=h.postdate,h.*from ( select t.* from tbl_summary_report t order by postdate asc ,registusers desc) h ,(select ...原创 2015-09-21 18:36:21 · 213 阅读 · 0 评论 -
sql cash when语句
select case u.sex when 1 then "man" when 2 then "woman" ELSE "unknow" END AS sex from user u原创 2014-12-12 15:06:27 · 2181 阅读 · 0 评论