标签:workspace join welcome ice disk desc sele use rom
select A.user_id,ifnull(sum(ifnull(A.ex_cpu,0)),0) AS a0, ifnull(sum(ifnull(A.ex_mem,0)),0) AS a1, ifnull(sum(ifnull(A.ex_disk,0)),0) AS a2, ifnull(sum(ifnull(B.cpu,0)),0) AS a3, ifnull(sum(ifnull(B.mem,0)),0) AS a4, ifnull(sum(ifnull(B.disk,0)),0) AS a5 from tbl_service_instance as A left join tbl_service_spec as B on A.service_spec_id = B.id where A.env_id ="84d97900-8d24-4904-984e-e49d6809e3af" and A.project_id ="6fe742d2-c872-4292-bb03-bf1af481cb4d " and A.status != 2 and A.status != 3 group by A.user_id;
select A.user_id, ifnull(sum(ifnull(A.ex_cpu,0)),0)+ifnull(sum(ifnull(B.cpu,0)),0) AS aaa, ifnull(sum(ifnull(A.ex_mem,0)),0)+ifnull(sum(ifnull(B.mem,0)),0) AS bbb, ifnull(sum(ifnull(A.ex_disk,0)),0)+ifnull(sum(ifnull(B.disk,0)),0) AS total from tbl_service_instance as A left join tbl_service_spec as B on A.service_spec_id = B.id where A.env_id = "84d97900-8d24-4904-984e-e49d6809e3af" and A.project_id = "6fe742d2-c872-4292-bb03-bf1af481cb4d" and A.status != 2 and A.status != 3 group by user_id ORDER BY total DESC LIMIT 5;
cd /opt/java/workspace/xproject && echo -e "\033[32mWarmly welcome, My honored master, I‘ll take full orders of you! \033[0m"
标签:workspace join welcome ice disk desc sele use rom
原文地址:http://www.cnblogs.com/junneyang/p/7519603.html