Sales.SalesTerritory
Documentation | AdventureWorks |
Schema | Sales |
Name | SalesTerritory |
Module | Sales |
Sales territory lookup table.
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | TerritoryID | int | Identity | Primary key for SalesTerritory records. | ||||
Primary key for SalesTerritory records. Identity |
||||||||
2 | Name | nvarchar(50) | Sales territory description | |||||
Sales territory description |
||||||||
3 | CountryRegionCode | nvarchar(3) | Person.CountryRegion | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. | ||||
ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. References: Person.CountryRegion |
||||||||
4 | Group | nvarchar(50) | Geographic area to which the sales territory belong. | |||||
Geographic area to which the sales territory belong. |
||||||||
5 | SalesYTD | money | Default: 0.00 | Sales in the territory year to date. | ||||
Sales in the territory year to date. Default: 0.00 |
||||||||
6 | SalesLastYear | money | Default: 0.00 | Sales in the territory the previous year. | ||||
Sales in the territory the previous year. Default: 0.00 |
||||||||
7 | CostYTD | money | Default: 0.00 | Business costs in the territory year to date. | ||||
Business costs in the territory year to date. Default: 0.00 |
||||||||
8 | CostLastYear | money | Default: 0.00 | Business costs in the territory the previous year. | ||||
Business costs in the territory the previous year. Default: 0.00 |
||||||||
9 | rowguid | uniqueidentifier | Default: newid() | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | ||||
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. Default: newid() |
||||||||
10 | ModifiedDate | datetime | Default: getdate() | Date and time the record was last updated. | ||||
Date and time the record was last updated. Default: getdate() |
Relations
Foreign table | Primary table | Join | Title / Name / Description | |
---|---|---|---|---|
Sales.SalesTerritory | Person.CountryRegion | Sales.SalesTerritory.CountryRegionCode = Person.CountryRegion.CountryRegionCode | FK_SalesTerritory_CountryRegion_CountryRegionCode Foreign key constraint referencing CountryRegion.CountryRegionCode. |
|
Sales.SalesTerritory.CountryRegionCode = Person.CountryRegion.CountryRegionCode Name: FK_SalesTerritory_CountryRegion_CountryRegionCodeForeign key constraint referencing CountryRegion.CountryRegionCode. |
||||
Sales.Customer | Sales.SalesTerritory | Sales.Customer.TerritoryID = Sales.SalesTerritory.TerritoryID | FK_Customer_SalesTerritory_TerritoryID Foreign key constraint referencing SalesTerritory.TerritoryID. |
|
Sales.Customer.TerritoryID = Sales.SalesTerritory.TerritoryID Name: FK_Customer_SalesTerritory_TerritoryIDForeign key constraint referencing SalesTerritory.TerritoryID. |
||||
Sales.SalesOrderHeader | Sales.SalesTerritory | Sales.SalesOrderHeader.TerritoryID = Sales.SalesTerritory.TerritoryID | FK_SalesOrderHeader_SalesTerritory_TerritoryID Foreign key constraint referencing SalesTerritory.TerritoryID. |
|
Sales.SalesOrderHeader.TerritoryID = Sales.SalesTerritory.TerritoryID Name: FK_SalesOrderHeader_SalesTerritory_TerritoryIDForeign key constraint referencing SalesTerritory.TerritoryID. |
||||
Sales.SalesPerson | Sales.SalesTerritory | Sales.SalesPerson.TerritoryID = Sales.SalesTerritory.TerritoryID | FK_SalesPerson_SalesTerritory_TerritoryID Foreign key constraint referencing SalesTerritory.TerritoryID. |
|
Sales.SalesPerson.TerritoryID = Sales.SalesTerritory.TerritoryID Name: FK_SalesPerson_SalesTerritory_TerritoryIDForeign key constraint referencing SalesTerritory.TerritoryID. |
||||
Sales.SalesTerritoryHistory | Sales.SalesTerritory | Sales.SalesTerritoryHistory.TerritoryID = Sales.SalesTerritory.TerritoryID | FK_SalesTerritoryHistory_SalesTerritory_TerritoryID Foreign key constraint referencing SalesTerritory.TerritoryID. |
|
Sales.SalesTerritoryHistory.TerritoryID = Sales.SalesTerritory.TerritoryID Name: FK_SalesTerritoryHistory_SalesTerritory_TerritoryIDForeign key constraint referencing SalesTerritory.TerritoryID. |
||||
Person.StateProvince | Sales.SalesTerritory | Person.StateProvince.TerritoryID = Sales.SalesTerritory.TerritoryID | FK_StateProvince_SalesTerritory_TerritoryID Foreign key constraint referencing SalesTerritory.TerritoryID. |
|
Person.StateProvince.TerritoryID = Sales.SalesTerritory.TerritoryID Name: FK_StateProvince_SalesTerritory_TerritoryIDForeign key constraint referencing SalesTerritory.TerritoryID. |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
PK_SalesTerritory_TerritoryID | TerritoryID | Primary key (clustered) constraint | |
Primary key (clustered) constraint | |||
AK_SalesTerritory_Name | Name | Unique nonclustered index. | |
Unique nonclustered index. | |||
AK_SalesTerritory_rowguid | rowguid | Unique nonclustered index. Used to support replication samples. | |
Unique nonclustered index. Used to support replication samples. |
Uses
Name |
---|
Sales.SalesTerritory
|
Used by
Exported: 2019-02-04 23:13, Last imported: 2018-03-07 11:56