题解 | #多个表间交叉连接#
汇总各个部门当前员工的title类型的分配数目
https://www.nowcoder.com/practice/4bcb6a7d3e39423291d2f7bdbbff87f8
select d.dept_no,
d.dept_name,
t.title,
count(t.title) count
from departments d, dept_emp de, titles t
where de.emp_no = t.emp_no
and de.dept_no = d.dept_no
and de.to_date = '9999-01-01'
and t.to_date = '9999-01-01'
group by de.dept_no, t.title
order by dept_no, title
