mysql 查询拥有超过5个APP的用户信息

select ue.nvcCompanyName as nvcCompanyName,ue.nvcUserName as nvcUserName,ue.nvcEmail ,ue.nvcQQ as QQ 
from userext ue where EXISTS 
(select COUNT(uaa.nvcEmail) as count from userapp uaa where ue.nvcEmail = uaa.nvcEmail GROUP BY uaa.nvcEmail having count > 5 ORDER BY uaa.nvcEmail DESC) 

 

posted @ 2016-03-21 11:34  phyxis_xu  阅读(327)  评论(0编辑  收藏  举报