这个题怎么做啊
select custname from customers
where city='ShangHai' and custid in (
select o.custid from orders o
left join orderdetail od on od.ordid=o.ordid
left join articles a on a.artid=od.artid
where o.ordered>=date_sub(curdate(),interval 6 month) and a.artname='BMW'
) group by custid;