如何减去两个查询量字段比较ID。
select customer_id,sum(amount) as totalamount from orders group by customer_id
UNION ALL
select id,sum(salary) as totalamount from customers group by id;
select customer_id,sum(amount) as totalamount from orders group by customer_id
UNION ALL
select id,sum(salary) as totalamount from customers group by id;
使用id减去两个查询结果