sql server 2008 - SQL Nested Aggregate Query- How do I get the number of customers per employee? -
the following prompt need answer: list number of customers each employee. include employee's name , number of customers labeled appropriately, listing employee customers first. the following employees table: create table employees (empid char(4) unique not null, ename varchar(10), job varchar(9), mgr char(4), hiredate date, salary decimal(7,2), comm decimal(7,2), deptno char(2) not null, primary key(empid), foreign key(deptno) references departments(deptno)); insert employees values (7839,'king','president',null,'17-nov-11',5000,null,10); insert employees values (7698,'blake','manager',7839,'01-may-11',2850,null,30); insert employees values (7782,'clark','manager',7839,'02-jun-11',2450,null,10); insert employees values (7566,'jones','manager',7839,'02-apr-11',2975,null,20); inser...