Databases > WideWorldImporters > Tables > Sales.InvoiceLines

WideWorldImporters

Sales.InvoiceLines

//
Detail lines from customer invoices

Created: Modified:

Columns

  • //
    ${escapify(column.description)}
    InvoiceLineID
    [int] NOT NULL DEFAULT (NEXT VALUE FOR [Sequences].[InvoiceLineID])
  • //
    ${escapify(column.description)}
    InvoiceID
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    StockItemID
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    Description
    [nvarchar](100) NOT NULL
  • //
    ${escapify(column.description)}
    PackageTypeID
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    Quantity
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    UnitPrice
    [decimal](18, 2) NULL
  • //
    ${escapify(column.description)}
    TaxRate
    [decimal](18, 3) NOT NULL
  • //
    ${escapify(column.description)}
    TaxAmount
    [decimal](18, 2) NOT NULL
  • //
    ${escapify(column.description)}
    LineProfit
    [decimal](18, 2) NOT NULL
  • //
    ${escapify(column.description)}
    ExtendedPrice
    [decimal](18, 2) NOT NULL
  • LastEditedBy
    [int] NOT NULL
  • LastEditedWhen
    [datetime2](8) NOT NULL DEFAULT (sysdatetime())

Indexes

  • PK_Sales_InvoiceLines
    UNIQUE CLUSTERED
    InvoiceLineID
  • //
    Auto-created to support a foreign key
    FK_Sales_InvoiceLines_InvoiceID
    NONCLUSTERED
    InvoiceID
  • //
    Auto-created to support a foreign key
    FK_Sales_InvoiceLines_StockItemID
    NONCLUSTERED
    StockItemID
  • //
    Auto-created to support a foreign key
    FK_Sales_InvoiceLines_PackageTypeID
    NONCLUSTERED
    PackageTypeID
  • NCCX_Sales_InvoiceLines
    NONCLUSTERED COLUMNSTORE
    InvoiceID , StockItemID , Quantity , UnitPrice , LineProfit , LastEditedWhen

Foreign Keys

  • FK_Sales_InvoiceLines_Application_People
    Application.People
    LastEditedBy ⥱ PersonID
  • FK_Sales_InvoiceLines_InvoiceID_Sales_Invoices
    Sales.Invoices
    InvoiceID ⥱ InvoiceID
  • FK_Sales_InvoiceLines_PackageTypeID_Warehouse_PackageTypes
    Warehouse.PackageTypes
    PackageTypeID ⥱ PackageTypeID
  • FK_Sales_InvoiceLines_StockItemID_Warehouse_StockItems
    Warehouse.StockItems
    StockItemID ⥱ StockItemID

Sample Data

InvoiceLineID
InvoiceID
StockItemID
Description
PackageTypeID
Quantity
UnitPrice
TaxRate
TaxAmount
LineProfit
ExtendedPrice
LastEditedBy
LastEditedWhen
1
1
67
Ride on toy sedan car (Black) 1/12 scale
7
10
230
15
345
850
2645
7
2
2
50
Developer joke mug - old C developers never die (White)
7
9
13
15
17.55
76.5
134.55
7
3
2
10
USB food flash drive - chocolate bar
7
9
32
15
43.2
180
331.2
7
4
3
114
Superhero action jacket (Blue) XXL
7
3
30
15
13.5
24
103.5
7
5
4
206
Permanent marker black 5mm nib (Black) 5mm
7
96
2.7
15
38.88
96
298.08
7
6
4
130
Furry gorilla with big eyes slippers (Black) S
7
5
32
15
24
120
184
7
7
4
50
Developer joke mug - old C developers never die (White)
7
2
13
15
3.9
17
29.9
7
8
5
128
Plush shark slippers (Gray) L
7
4
32
15
19.2
96
147.2
7
9
5
121
Dinosaur battery-powered slippers (Green) XL
7
3
32
15
14.4
70.5
110.4
7
10
5
155
Large sized bubblewrap roll 50m
7
20
24
15
72
220
552
7
11
6
150
Pack of 12 action figures (variety)
9
4
16
15
9.6
42
73.6
7
12
6
40
Developer joke mug - (hip, hip, array) (White)
7
6
13
15
11.7
51
89.7
7
13
6
126
Plush shark slippers (Gray) S
7
9
32
15
43.2
216
331.2
7
14
7
39
Developer joke mug - inheritance is the OO way to become wealthy (Black)
7
9
13
15
17.55
76.5
134.55
7
15
7
184
Shipping carton (Brown) 305x305x305mm
7
75
3.5
15
39.38
120
301.88
7
16
7
9
USB food flash drive - banana
7
6
32
15
28.8
120
220.8
7
17
7
132
Furry gorilla with big eyes slippers (Black) L
7
1
32
15
4.8
24
36.8
7
18
8
9
USB food flash drive - banana
7
4
32
15
19.2
80
147.2
7
19
8
32
Developer joke mug - that's a hardware problem (White)
7
9
13
15
17.55
76.5
134.55
7
20
8
50
Developer joke mug - old C developers never die (White)
7
1
13
15
1.95
8.5
14.95
7
21
9
58
RC toy sedan car with remote control (Black) 1/50 scale
7
2
25
15
7.5
25
57.5
7
22
9
134
Animal with big feet slippers (Brown) S
7
4
32
15
19.2
96
147.2
7
23
10
38
Developer joke mug - inheritance is the OO way to become wealthy (White)
7
5
13
15
9.75
42.5
74.75
7
24
10
34
Developer joke mug - fun was unexpected at this time (White)
7
3
13
15
5.85
25.5
44.85
7
25
11
45
Developer joke mug - there are 10 types of people in the world (Black)
7
1
13
15
1.95
8.5
14.95
7