diff sample2_1.sql @ 55:05cf88c20cc5

sample I/O pair, with range annotations
author Henry S. Thompson <ht@markup.co.uk>
date Tue, 30 May 2017 09:52:49 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sample2_1.sql	Tue May 30 09:52:49 2017 +0100
@@ -0,0 +1,33 @@
+CREATE TABLE sample2_1_raw
+(
+ date	date,
+ offered	int,
+ batch		int primary key,
+ completed	int,
+ rejected	int,
+ directory	text,
+ AMT_label	text
+);
+
+CREATE VIEW sample2_1
+(date, offered,
+ target,
+ batch, completed, rejected,
+ reject_percent,
+ directory, AMT_label)
+ AS SELECT
+ date, offered,
+ offered-rejected,
+ batch, completed, rejected,
+ rejected/completed,
+ directory, AMT_label
+ FROM sample2_1_raw;
+
+INSERT INTO sample2_1_raw VALUES
+('2010-04-02', 100, 6126, 12, NULL, 'ssq', '*Semantic Search Relevance 2'),
+('2010-04-09', 200, 6247, 17, 0, 'ssq', '*Semantic Search Relevance final'),
+('2010-04-09', 1, 6251, 1, NULL, 'ssq', '*submit test'),
+('2010-04-09', 1, 6252, 1, NULL, 'ssq', '*submit test'),
+('2010-04-09', 60, 6256, 24, 0, 'ssq', '*Semantic Search Relevance final'),
+('2010-04-12', 60, 6278, 0, NULL, 'ssq', '*Semantic Search Relevance final'),
+('2010-04-12', 86, 222547, 86, 26, 'ssq/upload3.csv', 'Semantic Search Relevance');