https://www.jianshu.com/p/f06fd7a35a1d
http://www.cnblogs.com/stsinghua/p/6409583.html
https://blog.csdn.net/u013991521/article/details/82634247
select 后面写判断条件;如下面这样写,以上是这个值如果为空就是8
ifnull(rank,8) as rank
order by 后面也可以添加判断,只是不需要再写 as什么什么的
IFNULL((cc.rank),8) ASC