第一个查询语句
第二个查询语句
想要的查询结果
select (第二个查询) as repairnum, (第一个查询) as leftnum
select
count(a.gs1) as leftnum,
count(b.gs1) as repairnum
from rent_detail a,
rent_detail b
where a.ocode='rent1' and b.ocode='rent1'
and a.status='0' and b.status='1'
select count(a.gs1) as leftnum,count(b.gs1) as repairnum from rent_detail a inner join rent_detail b where a.ocode='rent1' and b.ocode='rent1' and a.status='0' and b.status='1'
用UNION 功能试试看