6> CREATE TABLE Employees (
7> EmployeeID int NOT NULL ,
8> LastName nvarchar (20) NOT NULL ,
9> FirstName nvarchar (10) NOT NULL ,
10> Title nvarchar (30) NULL ,
11> TitleOfCourtesy nvarchar (25) NULL ,
12> BirthDate datetime NULL ,
13> HireDate datetime NULL ,
14> Address nvarchar (60) NULL ,
15> City nvarchar (15) NULL ,
16> Region nvarchar (15) NULL ,
17> PostalCode nvarchar (10) NULL ,
18> Country nvarchar (15) NULL ,
19> HomePhone nvarchar (24) NULL ,
20> Extension nvarchar (4) NULL ,
21> Photo image NULL ,
22> Notes ntext NULL ,
23> ReportsTo int NULL ,
24> PhotoPath nvarchar (255) NULL
25>
26> )
27> GO
1>
2> SELECT ReportsTo, COUNT(*)
3> FROM Employees
4> GROUP BY ReportsTo
5> GO
ReportsTo
----------- -----------
(0 rows affected)
1>
2> drop table Employees;
3> GO
|