select count(distinct user_id)
from
(select user_id from db_amazon.tbl_order where `date` = ...
union all
select user_id from db_jd.tbl_order where `date` = ...
union all
select user_id from db_taobao.tbl_order where `date` = ...
)
登陆后获取userid,然后指定订单表user=刚才的select * from order a,user b where a.id=b.id and b.userid='XXX'
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)