Chapter 8 – Database Redesign
Page 8-86
We need to examine the data for items purchased from the same store on the same date—those
should show up on one INVOICE. In the data, the only time this happened was on May 20, 2018,
when two items were purchased from the store with StoreID 1100 by Purchasing Agent 104.
Based on this, here are the INSERT statements to populate the tables:
INSERT INTO INVOICE
(StoreID, PurchasingAgentID, InvoiceDate)
VALUES
(1050, 101, ’10-Dec-17′),
(1050, 102, ’12-Dec-17′),
(1200, 104, ’15-Dec-17′),
(1200, 104, ’16-Dec-17′),
(1050, 102, ’07-Apr-18′),