select c.cid from card as c where (
(select bid from book where bname='网络') in (select b.bid from borrow as b where b.cid=c.cid)
) and (
(select bid from book where bname='软件') in (select b.bid from borrow as b where b.cid=c.cid)
)