/********************************************************************************/
/*																				*/
/*	Kroenke, Auer, Vandenberg, Yoder - DBC (8th Edition) Chapter 08				*/
/*																				*/
/*	The QACS-DW Database Data													*/
/*																				*/
/*	These are the Microsoft SQL Server 2016 SQL code solutions					*/
/*																				*/
/********************************************************************************/
/*****   TIMELINE   *************************************************************/
-- use Excel DATEVALUE("14-DEC-2016") etc to get TimeID values

INSERT INTO TIMELINE VALUES(
	42718, '14-DEC-16',	12, 'Dec', 4, 'Qtr4', 2016);
INSERT INTO TIMELINE VALUES(
	42719, '15-DEC-16',	12, 'Dec', 4, 'Qtr4', 2016);
INSERT INTO TIMELINE VALUES(
	42727, '23-DEC-16',	12, 'Dec', 4, 'Qtr4', 2016);
INSERT INTO TIMELINE VALUES(
	42740, '05-JAN-17',	1, 'Jan', 1, 'Qtr1', 2017);
INSERT INTO TIMELINE VALUES(
	42745, '10-JAN-17',	1, 'Jan', 1, 'Qtr1', 2017);
INSERT INTO TIMELINE VALUES(
	42747, '12-JAN-17',	1, 'Jan', 1, 'Qtr1', 2017);
INSERT INTO TIMELINE VALUES(
	42750, '15-JAN-17',	1, 'Jan', 1, 'Qtr1', 2017);
INSERT INTO TIMELINE VALUES(
	42760, '25-JAN-17',	1, 'Jan', 1, 'Qtr1', 2017);
INSERT INTO TIMELINE VALUES(
	42770, '04-FEB-17',	2, 'Feb', 2, 'Qtr2', 2017);
INSERT INTO TIMELINE VALUES(
	42773, '07-FEB-17',	2, 'Feb', 2, 'Qtr2', 2017);
INSERT INTO TIMELINE VALUES(
	42777, '11-FEB-17',	2, 'Feb', 2, 'Qtr2', 2017);

/*****   CUSTOMER DATA   ********************************************************/

INSERT INTO CUSTOMER VALUES(
	1, 'Shire, Robert', 'Seattle', 'WA', '98103');
INSERT INTO CUSTOMER VALUES(
	2, 'Goodyear, Katherine', 'Seattle', 'WA', '98105');
INSERT INTO CUSTOMER VALUES(
	3, 'Bancroft, Chris', 'Bellevue', 'WA', '98005');
INSERT INTO CUSTOMER VALUES(
	4, 'Griffith, John', 'Seattle', 'WA', '98109');
INSERT INTO CUSTOMER VALUES(
	5, 'Tierney, Doris', 'Bellevue', 'WA', '98005');
INSERT INTO CUSTOMER VALUES(
	6, 'Anderson, Donna', 'Mt. Vernon', 'WA', '98273');
INSERT INTO CUSTOMER VALUES(
	7, 'Svane, Jack', 'Seattle', 'WA', '98115');
INSERT INTO CUSTOMER VALUES(
	8, 'Walsh, Denesha', 'Redmond', 'WA', '98053');
INSERT INTO CUSTOMER VALUES(
	9, 'Enquist, Craig', 'Bellingham', 'WA', '98225');
INSERT INTO CUSTOMER VALUES(
	10, 'Anderson, Rose', 'Seattle', 'WA', '98105');


/*****   VENDOR DATA   **********************************************************/

INSERT INTO VENDOR VALUES(1001,	'Linens and Things');
INSERT INTO VENDOR VALUES(1002,	'European Specialties');
INSERT INTO VENDOR VALUES(1003,	'Lamps and Lighting');
INSERT INTO VENDOR VALUES(1004,	'Lee, Andrew');
INSERT INTO VENDOR VALUES(1005,	'Harrison, Denise');
INSERT INTO VENDOR VALUES(1006,	'New York Brokerage');
INSERT INTO VENDOR VALUES(1007,	'Walsh, Denesha');
INSERT INTO VENDOR VALUES(1008,	'Bancroft, Chris');
INSERT INTO VENDOR VALUES(1009,	'Specialty Antiques');
INSERT INTO VENDOR VALUES(1010,	'General Antiques');


/*****   ITEM DATA   ************************************************************/

INSERT INTO ITEM VALUES(1000001, 'Antique Desk');
INSERT INTO ITEM VALUES(1000002, 'Antique Desk Chair');
INSERT INTO ITEM VALUES(1000003, 'Dining Table Linens');
INSERT INTO ITEM VALUES(1000004, 'Candles');
INSERT INTO ITEM VALUES(1000005, 'Candles');
INSERT INTO ITEM VALUES(1000006, 'Desk Lamp');
INSERT INTO ITEM VALUES(1000007, 'Dining Table Linens');
INSERT INTO ITEM VALUES(1000008, 'Book Shelf');
INSERT INTO ITEM VALUES(1000009, 'Antique Chair');
INSERT INTO ITEM VALUES(1000010, 'Antique Chair');
INSERT INTO ITEM VALUES(1000011, 'Antique Candle Holders');
INSERT INTO ITEM VALUES(1000012, 'Antique Desk');
INSERT INTO ITEM VALUES(1000013, 'Antique Desk');
INSERT INTO ITEM VALUES(1000014, 'Antique Desk Chair');
INSERT INTO ITEM VALUES(1000015, 'Antique Desk Chair');
INSERT INTO ITEM VALUES(1000016, 'Desk Lamp');
INSERT INTO ITEM VALUES(1000017, 'Desk Lamp');
INSERT INTO ITEM VALUES(1000018, 'Desk Lamp');
INSERT INTO ITEM VALUES(1000019, 'Antique Dining Table');
INSERT INTO ITEM VALUES(1000020, 'Antique Sideboard');
INSERT INTO ITEM VALUES(1000021, 'Dining Table Chairs');
INSERT INTO ITEM VALUES(1000022, 'Dining Table Linens');
INSERT INTO ITEM VALUES(1000023, 'Dining Table Linens');
INSERT INTO ITEM VALUES(1000024, 'Candles');
INSERT INTO ITEM VALUES(1000025, 'Candles');

/*****   SALE_ITEM DATA   *******************************************************/
-- use Excel DATEVALUE("14-DEC-2016") etc to get TimeID values

INSERT INTO SALE_ITEM VALUES(42718, 1, 1000001, 1002, 3000.00); 
INSERT INTO SALE_ITEM VALUES(42718, 1, 1000002, 1004, 500.00); 
INSERT INTO SALE_ITEM VALUES(42719, 2, 1000003, 1001, 1000.00); 
INSERT INTO SALE_ITEM VALUES(42719, 3, 1000004, 1001, 50.00);
INSERT INTO SALE_ITEM VALUES(42727, 4, 1000005, 1001, 45.00); 
INSERT INTO SALE_ITEM VALUES(42740, 1, 1000006, 1003, 250.00); 
INSERT INTO SALE_ITEM VALUES(42745, 5, 1000007, 1001, 750.00); 
INSERT INTO SALE_ITEM VALUES(42747, 6, 1000008, 1005, 250.00); 
INSERT INTO SALE_ITEM VALUES(42750, 2, 1000009, 1006, 1250.00); 
INSERT INTO SALE_ITEM VALUES(42750, 2, 1000010, 1006, 1750.00); 
INSERT INTO SALE_ITEM VALUES(42760, 5, 1000011, 1002, 350.00); 
INSERT INTO SALE_ITEM VALUES(42770, 7, 1000019, 1007, 5000.00); 
INSERT INTO SALE_ITEM VALUES(42770, 7, 1000021, 1009, 8500.00); 
INSERT INTO SALE_ITEM VALUES(42770, 7, 1000022, 1001, 750.00); 
INSERT INTO SALE_ITEM VALUES(42770, 8, 1000017, 1010, 250.00); 
INSERT INTO SALE_ITEM VALUES(42773, 5, 1000024, 1001, 50.00); 
INSERT INTO SALE_ITEM VALUES(42773, 9, 1000020, 1008, 4500.00); 
INSERT INTO SALE_ITEM VALUES(42777, 10, 1000012, 1002, 3200.00); 
INSERT INTO SALE_ITEM VALUES(42777, 10, 1000014, 1009, 475.00); 
INSERT INTO SALE_ITEM VALUES(42777, 2, 1000023, 1001, 800.00); 

/********************************************************************************/
