先读题,然后我们就大概知道了,可以用连接来做,也可以用子查询来做,听说用子查询比较快,我们就用子查询来做
use “3120004023”;
select
count(ordid) “TOTAL ORDERS”
from shoporder
where custid in(select custid from customer where customer.cgender=‘F’);
直接用子查询进行解答,查询结果如下图:
先读题,然后我们就大概知道了,可以用连接来做,也可以用子查询来做,听说用子查询比较快,我们就用子查询来做
use “3120004023”;
select
count(ordid) “TOTAL ORDERS”
from shoporder
where custid in(select custid from customer where customer.cgender=‘F’);
直接用子查询进行解答,查询结果如下图: