CREATE A COMPLEX VIEW THAT WILL JOIN AND AGGREGATE THE TWO SIMPLE VIEWS

3. Create a complex view that will join and aggregate the two simple views. Note

that there is no reason not to have views of views.

create view dep_sum_v asselect e.department_id,count(1) staff, sum(e.salary) salaries,d.department_name from emp_anon_v e join dept_anon_v don e.department_id=d.department_idgroup by e.department_id,d.department_name;