-- FactOrderTable.sql

-- used with SortOrderProblems.sql

CREATE TEMP TABLE

IF NOT EXISTS xFactOrderTable(FactTypeID INT PRIMARY KEY, NAME, OrderMin INT, OrderMax INT);
	INSERT
		OR REPLACE
	INTO xFactOrderTable
	VALUES (
		503
		,'Stillborn'
		,9
		,10
		);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	6
	,'Adoption'
	,10
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	10
	,'Blessing'
	,10
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	18
	,'Census'
	,10
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	29
	,'Residence'
	,10
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	504
	,'Illness'
	,10
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	505
	,'Living'
	,10
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	1
	,'Birth'
	,10
	,10
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	3
	,'Christen'
	,20
	,20
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	7
	,'Baptism'
	,30
	,30
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	12
	,'Confirmation'
	,40
	,40
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	13
	,'First communion'
	,50
	,50
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	304
	,'Engagement'
	,95
	,100
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	305
	,'Marriage Bann'
	,96
	,100
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	306
	,'Marriage Contract'
	,97
	,100
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	307
	,'Marriage License'
	,98
	,100
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	308
	,'Marriage Settlement'
	,99
	,100
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	510
	,'Separation'
	,105
	,120
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	14
	,'Ordination'
	,100
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	21
	,'Graduation'
	,100
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	22
	,'Retirement'
	,100
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	24
	,'Education'
	,100
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	300
	,'Marriage'
	,100
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	310
	,'Residence (family)'
	,100
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	311
	,'Census (family)'
	,100
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	500
	,'Degree'
	,100
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	501
	,'Military'
	,100
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	301
	,'Annulment'
	,110
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	303
	,'Divorce filed'
	,115
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	302
	,'Divorce'
	,120
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	2
	,'Death'
	,200
	,200
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	5
	,'Cremation'
	,210
	,210
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	4
	,'Burial'
	,220
	,220
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	20
	,'Will'
	,230
	,230
	);

INSERT
	OR REPLACE
INTO xFactOrderTable
VALUES (
	19
	,'Probate'
	,240
	,240
	);

SELECT *
FROM xFactOrderTable;
