union: select user_id from uauth_userinfo union select price from shop;
union all: select user_id from uauth_userinfo union all select user_id from uauth_unreadcount;
把union all联合后的数据当作一般的select后的数据进行处理的方法:
把整个数据用小括号()扩起来,后面加上 as name2 不写as也可以
select user_id,count() from (select user_id from uauth_userinfo union all select user_id from uauth_unreadcount) as a group by user_id order by count();