Datasets:

Modalities:
Text
Formats:
text
Size:
< 1K
ArXiv:
Libraries:
Datasets
License:
jixy2012 commited on
Commit
3e7c527
·
1 Parent(s): 756d949

fix: only retained needed db files for test split

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. spider-context-test.json +0 -0
  2. test_database/bike_1/bike_1.sqlite → spider-corpus-test.json +2 -2
  3. test_database/academic/academic.sqlite +0 -3
  4. test_database/academic/schema.sql +0 -108
  5. test_database/aircraft/schema.sql +0 -108
  6. test_database/{car_1/data_csv/countries.csv → art_1/art_1.sqlite} +2 -2
  7. test_database/{icfp_1 → art_1}/link.txt +0 -0
  8. test_database/art_1/q.txt +9 -0
  9. test_database/bakery_1/annotation.json +58 -0
  10. test_database/{car_1/car_1.json → bakery_1/bakery_1.json} +33 -123
  11. test_database/bakery_1/bakery_1.sql +30 -0
  12. test_database/{geo/geo.sqlite → bakery_1/bakery_1.sqlite} +1 -1
  13. test_database/bakery_1/bakery_1_michi.txt +411 -0
  14. test_database/bakery_1/data_csv/README.BAKERY.TXT +110 -0
  15. test_database/{car_1/data_csv/car-makers.csv → bakery_1/data_csv/customers.csv} +2 -2
  16. test_database/{car_1/data_csv/continents.csv → bakery_1/data_csv/customers_t.csv} +2 -2
  17. test_database/{car_1/data_csv/model-list.csv → bakery_1/data_csv/goods.csv} +2 -2
  18. test_database/bakery_1/data_csv/goods_t.csv +3 -0
  19. test_database/{car_1/car_1.sqlite → bakery_1/data_csv/items (3:11:18, 5:53 PM)_original.csv} +2 -2
  20. test_database/{aircraft/aircraft.sqlite → bakery_1/data_csv/items.csv} +2 -2
  21. test_database/bakery_1/data_csv/items_t.csv +3 -0
  22. test_database/bakery_1/data_csv/receipts (3:11:18, 5:53 PM)_original.csv +3 -0
  23. test_database/bakery_1/data_csv/receipts.csv +3 -0
  24. test_database/bakery_1/data_csv/receipts_t.csv +3 -0
  25. test_database/{car_1 → bakery_1}/link.txt +0 -0
  26. test_database/bakery_1/q.txt +25 -0
  27. test_database/bike_1/schema.sql +0 -0
  28. test_database/{cinema/cinema.sqlite → bike_racing/bike_racing.sqlite} +1 -1
  29. test_database/bike_racing/schema.sql +56 -0
  30. test_database/bike_racing/schema_old.sql +56 -0
  31. test_database/{company_employee/company_employee.sqlite → book_press/book_press.sqlite} +1 -1
  32. test_database/book_press/schema.sql +67 -0
  33. test_database/{candidate_poll/candidate_poll.sqlite → book_review/book_review.sqlite} +1 -1
  34. test_database/book_review/schema.sql +34 -0
  35. test_database/book_review/schema_old.sql +34 -0
  36. test_database/browser_web/schema.sql +0 -58
  37. test_database/candidate_poll/schema.sql +0 -42
  38. test_database/car_1/annotation.json +0 -62
  39. test_database/car_1/car_1.sql +0 -52
  40. test_database/car_1/data_csv/README.CARS.TXT +0 -149
  41. test_database/car_1/data_csv/car-names.csv +0 -3
  42. test_database/car_1/data_csv/cars-data.csv +0 -3
  43. test_database/car_1/data_csv/cars.desc +0 -94
  44. test_database/car_1/q.txt +0 -27
  45. test_database/cinema/schema.sql +0 -60
  46. test_database/{browser_web/browser_web.sqlite → club_leader/club_leader.sqlite} +1 -1
  47. test_database/club_leader/schema.sql +61 -0
  48. test_database/club_leader/schema_old.sql +61 -0
  49. test_database/college_2/TextBookExampleSchema.sql +0 -0
  50. test_database/college_2/college_2.sqlite +0 -3
spider-context-test.json DELETED
The diff for this file is too large to render. See raw diff
 
test_database/bike_1/bike_1.sqlite → spider-corpus-test.json RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f5ae0e24e3a9d860a38ec6256828e3b9e37691c80931ef554adc202f8eb2950c
3
- size 1785856
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df77f2b1673ce3dd0f42d3a227a4b594c6f38ee390940a75f525bbaa0e71b8e4
3
+ size 25647102
test_database/academic/academic.sqlite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9ca59ebaa830731011a222885480e4b9f9d49c3e36849dee25b769fb74f296c2
3
- size 122880
 
 
 
 
test_database/academic/schema.sql DELETED
@@ -1,108 +0,0 @@
1
- PRAGMA foreign_keys = ON;
2
- CREATE TABLE "author" (
3
- "aid" int,
4
- "homepage" text,
5
- "name" text,
6
- "oid" int,
7
- primary key("aid")
8
- );
9
- CREATE TABLE "conference" (
10
- "cid" int,
11
- "homepage" text,
12
- "name" text,
13
- primary key ("cid")
14
- );
15
- CREATE TABLE "domain" (
16
- "did" int,
17
- "name" text,
18
- primary key ("did")
19
- );
20
- CREATE TABLE "domain_author" (
21
- "aid" int,
22
- "did" int,
23
- primary key ("did", "aid"),
24
- foreign key("aid") references `author`("aid"),
25
- foreign key("did") references `domain`("did")
26
- );
27
-
28
- CREATE TABLE "domain_conference" (
29
- "cid" int,
30
- "did" int,
31
- primary key ("did", "cid"),
32
- foreign key("cid") references `conference`("cid"),
33
- foreign key("did") references `domain`("did")
34
- );
35
- CREATE TABLE "journal" (
36
- "homepage" text,
37
- "jid" int,
38
- "name" text,
39
- primary key("jid")
40
- );
41
- CREATE TABLE "domain_journal" (
42
- "did" int,
43
- "jid" int,
44
- primary key ("did", "jid"),
45
- foreign key("jid") references "journal"("jid"),
46
- foreign key("did") references "domain"("did")
47
- );
48
- CREATE TABLE "keyword" (
49
- "keyword" text,
50
- "kid" int,
51
- primary key("kid")
52
- );
53
- CREATE TABLE "domain_keyword" (
54
- "did" int,
55
- "kid" int,
56
- primary key ("did", "kid"),
57
- foreign key("kid") references "keyword"("kid"),
58
- foreign key("did") references "domain"("did")
59
- );
60
- CREATE TABLE "publication" (
61
- "abstract" text,
62
- "cid" text,
63
- "citation_num" int,
64
- "jid" int,
65
- "pid" int,
66
- "reference_num" int,
67
- "title" text,
68
- "year" int,
69
- primary key("pid"),
70
- foreign key("jid") references "journal"("jid"),
71
- foreign key("cid") references "conference"("cid")
72
- );
73
- CREATE TABLE "domain_publication" (
74
- "did" int,
75
- "pid" int,
76
- primary key ("did", "pid"),
77
- foreign key("pid") references "publication"("pid"),
78
- foreign key("did") references "domain"("did")
79
- );
80
-
81
- CREATE TABLE "organization" (
82
- "continent" text,
83
- "homepage" text,
84
- "name" text,
85
- "oid" int,
86
- primary key("oid")
87
- );
88
-
89
- CREATE TABLE "publication_keyword" (
90
- "pid" int,
91
- "kid" int,
92
- primary key ("kid", "pid"),
93
- foreign key("pid") references "publication"("pid"),
94
- foreign key("kid") references "keyword"("kid")
95
- );
96
- CREATE TABLE "writes" (
97
- "aid" int,
98
- "pid" int,
99
- primary key ("aid", "pid"),
100
- foreign key("pid") references "publication"("pid"),
101
- foreign key("aid") references "author"("aid")
102
- );
103
- CREATE TABLE "cite" (
104
- "cited" int,
105
- "citing" int,
106
- foreign key("cited") references "publication"("pid"),
107
- foreign key("citing") references "publication"("pid")
108
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test_database/aircraft/schema.sql DELETED
@@ -1,108 +0,0 @@
1
-
2
- PRAGMA foreign_keys = ON;
3
-
4
-
5
- CREATE TABLE `pilot` (
6
- `Pilot_Id` int(11) NOT NULL,
7
- `Name` varchar(50) NOT NULL,
8
- `Age` int(11) NOT NULL,
9
- PRIMARY KEY (`Pilot_Id`)
10
- );
11
-
12
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (1, 'Prof. Zackery Collins', 23);
13
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (2, 'Katheryn Gorczany IV', 20);
14
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (3, 'Mr. Cristian Halvorson II', 23);
15
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (4, 'Ayana Spencer', 25);
16
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (5, 'Ellen Ledner III', 31);
17
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (6, 'Elisha Hickle V', 37);
18
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (7, 'Dr. Jade Bradtke V', 26);
19
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (8, 'Winnifred Boyle', 30);
20
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (9, 'Della Lindgren', 29);
21
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (10, 'Maxwell Graham', 26);
22
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (11, 'Blaise Muller', 33);
23
- INSERT INTO `pilot` (`Pilot_Id`, `Name`, `age`) VALUES (12, 'Baylee Steuber', 30);
24
-
25
-
26
- CREATE TABLE `aircraft` (
27
- "Aircraft_ID" int(11) NOT NULL,
28
- "Aircraft" varchar(50) NOT NULL,
29
- "Description" varchar(50) NOT NULL,
30
- "Max_Gross_Weight" varchar(50) NOT NULL,
31
- "Total_disk_area" varchar(50) NOT NULL,
32
- "Max_disk_Loading" varchar(50) NOT NULL,
33
- PRIMARY KEY (`Aircraft_ID`)
34
- );
35
-
36
-
37
- CREATE TABLE `match` (
38
- "Round" real,
39
- "Location" text,
40
- "Country" text,
41
- "Date" text,
42
- "Fastest_Qualifying" text,
43
- "Winning_Pilot" text,
44
- "Winning_Aircraft" text,
45
- PRIMARY KEY ("Round"),
46
- FOREIGN KEY (`Winning_Aircraft`) REFERENCES `aircraft`(`Aircraft_ID`),
47
- FOREIGN KEY (`Winning_Pilot`) REFERENCES `pilot`(`Pilot_Id`)
48
- );
49
-
50
- CREATE TABLE `airport` (
51
- "Airport_ID" int,
52
- "Airport_Name" text,
53
- "Total_Passengers" real,
54
- "%_Change_2007" text,
55
- "International_Passengers" real,
56
- "Domestic_Passengers" real,
57
- "Transit_Passengers" real,
58
- "Aircraft_Movements" real,
59
- "Freight_Metric_Tonnes" real,
60
- PRIMARY KEY ("Airport_ID")
61
- );
62
-
63
- CREATE TABLE `airport_aircraft` (
64
- "ID" int,
65
- "Airport_ID" int,
66
- "Aircraft_ID" int,
67
- PRIMARY KEY ("Airport_ID","Aircraft_ID"),
68
- FOREIGN KEY ("Airport_ID") REFERENCES `airport`(`Airport_ID`),
69
- FOREIGN KEY ("Aircraft_ID") REFERENCES `aircraft`(`Aircraft_ID`)
70
- );
71
-
72
-
73
-
74
- INSERT INTO "aircraft" VALUES (1,"Robinson R-22","Light utility helicopter","1,370 lb (635 kg)","497 ft² (46.2 m²)","2.6 lb/ft² (14 kg/m²)");
75
- INSERT INTO "aircraft" VALUES (2,"Bell 206B3 JetRanger","Turboshaft utility helicopter","3,200 lb (1,451 kg)","872 ft² (81.1 m²)","3.7 lb/ft² (18 kg/m²)");
76
- INSERT INTO "aircraft" VALUES (3,"CH-47D Chinook","Tandem rotor helicopter","50,000 lb (22,680 kg)","5,655 ft² (526 m²)","8.8 lb/ft² (43 kg/m²)");
77
- INSERT INTO "aircraft" VALUES (4,"Mil Mi-26","Heavy-lift helicopter","123,500 lb (56,000 kg)","8,495 ft² (789 m²)","14.5 lb/ft² (71 kg/m²)");
78
- INSERT INTO "aircraft" VALUES (5,"CH-53E Super Stallion","Heavy-lift helicopter","73,500 lb (33,300 kg)","4,900 ft² (460 m²)","15 lb/ft² (72 kg/m²)");
79
-
80
-
81
- INSERT INTO "match" VALUES ("1","Mina' Zayid , Abu Dhabi","United Arab Emirates","March 26–27","Hannes Arch",1,1);
82
- INSERT INTO "match" VALUES ("2","Swan River , Perth","Australia","April 17–18","Paul Bonhomme",4,1);
83
- INSERT INTO "match" VALUES ("3","Flamengo Beach , Rio de Janeiro","Brazil","May 8–9","Hannes Arch",6,2);
84
- INSERT INTO "match" VALUES ("4","Windsor , Ontario","Canada","June 5–6","Nigel Lamb",4,4);
85
- INSERT INTO "match" VALUES ("5","New York City","United States","June 19–20","Hannes Arch",9,3);
86
- INSERT INTO "match" VALUES ("6","EuroSpeedway Lausitz","Germany","August 7–8","Paul Bonhomme",2,4);
87
- INSERT INTO "match" VALUES ("7","River Danube , Budapest","Hungary","Cancelled","Cancelled",6,5);
88
-
89
-
90
-
91
- INSERT INTO "airport" VALUES (1,"London Heathrow","67054745","1.5%","61344438","5562516","147791","478693","1397054");
92
- INSERT INTO "airport" VALUES (2,"London Gatwick","34205887","2.9%","30431051","3730963","43873","263653","107702");
93
- INSERT INTO "airport" VALUES (3,"London Stansted","22360364","6.0%","19996947","2343428","19989","193282","197738");
94
- INSERT INTO "airport" VALUES (4,"Manchester","21219195","4.0%","18119230","2943719","156246","204610","141781");
95
- INSERT INTO "airport" VALUES (5,"London Luton","10180734","2.6%","8853224","1320678","6832","117859","40518");
96
- INSERT INTO "airport" VALUES (6,"Birmingham Airport","9627589","4.3%","8105162","1471538","50889","112227","12192");
97
- INSERT INTO "airport" VALUES (7,"Edinburgh","9006702","0.5%","3711140","5281038","14524","125550","12418");
98
- INSERT INTO "airport" VALUES (8,"Glasgow International","8178891","7.0%","3943139","4192121","43631","100087","3546");
99
- INSERT INTO "airport" VALUES (9,"Bristol","6267114","5.7%","5057051","1171605","38458","76517","3");
100
- INSERT INTO "airport" VALUES (10,"East Midlands","5620673","3.8%","4870184","746094","4395","93038","261507");
101
-
102
-
103
-
104
- INSERT INTO "airport_aircraft" VALUES (1,6,5);
105
- INSERT INTO "airport_aircraft" VALUES (2,2,1);
106
- INSERT INTO "airport_aircraft" VALUES (3,1,2);
107
- INSERT INTO "airport_aircraft" VALUES (4,9,3);
108
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test_database/{car_1/data_csv/countries.csv → art_1/art_1.sqlite} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ec03acf6d53e10e6299279f46a544952d18a247ad096d7f5fb6231e542032e70
3
- size 248
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ccfd00de54bbe9a7ce57f226e9634e8c4693520299795fb8da834017fc55d735
3
+ size 8192
test_database/{icfp_1 → art_1}/link.txt RENAMED
File without changes
test_database/art_1/q.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ q0. Retrieve the title of each painting, the artist's last name, its height in inches and its width in inches in descending order of surface area.
2
+
3
+ q1. Retrieve the artistID, first name, last name, and age at death of the artist(s) who was/were youngest at the time of death. (Note that since the birth and death dates are given as years only, any age computation is approximate, accurate plus or minus one.)
4
+
5
+ q2. Retrieve the titles of all paintings and sculptures, with the artists' last names, in the database and the age the artist was at the time the work was produced, in order of youngest to oldest such age.
6
+
7
+ q3. Retrieve the artist's last name and the title of all the undisplayed works.
8
+
9
+ q4. Write a query to display the artistID, last name and all (distinct) media used by all artists in all paintings. Order the query result by last name, ascending. Your results should include not just the medium ("oil") but the surface the medium is on ("oil on canvas"). Use GROUP_CONCAT to denormalize the data and produce comma-delimited results like this:
test_database/bakery_1/annotation.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "label_id": null,
3
+ "data": [
4
+ {
5
+ "nl": "Find all chocolate-flavored items on the menu whose price is under $5.00. For each item output the flavor, the name (food type) of the item, and the price.\n",
6
+ "id": 0
7
+ },
8
+ {
9
+ "nl": "Report the prices of any lemon-flavored items. Output the flavor, the name (food type) and the price of each pastry.\n",
10
+ "id": 1
11
+ },
12
+ {
13
+ "nl": "Find all customers who made a purchase on October 3, 2007. Report the name of the customer (first, last).\n",
14
+ "id": 2
15
+ },
16
+ {
17
+ "nl": "Find all types of cookies purchased by KIP ARNN during the month of October of 2007. Report each cookie type (flavor, food type) exactly once.\n",
18
+ "id": 3
19
+ },
20
+ {
21
+ "nl": "Report the total amount of money NATACHA STENZ spent at the bakery during the month of October, 2007.\n",
22
+ "id": 4
23
+ },
24
+ {
25
+ "nl": "Find all customers who purchased, during the same trip to the bakery, two different Croissants. Report first and last names of the customers.\n",
26
+ "id": 5
27
+ },
28
+ {
29
+ "nl": "Find the total amount of money the bakery earned in October 2007 from selling eclairs. Report just the amount.\n",
30
+ "id": 6
31
+ },
32
+ {
33
+ "nl": "Report all days on which more than ten tarts were purchased.\n",
34
+ "id": 7
35
+ },
36
+ {
37
+ "nl": "For each purchase made by NATACHA STENZ output the receipt number, the date of purchase, the total number of items purchased and the amount paid.\n",
38
+ "id": 8
39
+ },
40
+ {
41
+ "nl": "Find the customer(s) who spent the most on pastries in October of 2007. Report first and last name.\n",
42
+ "id": 9
43
+ },
44
+ {
45
+ "nl": "Find the type of baked good (food type, flavor) responsible for highest total revenue.\n",
46
+ "id": 10
47
+ },
48
+ {
49
+ "nl": "Find the day of the highest revenue in the month of October, 2007.\n",
50
+ "id": 11
51
+ },
52
+ {
53
+ "nl": "Find the best-selling item (by number of purchases) on the day of the highest revenue in October of 2007.\n",
54
+ "id": 12
55
+ }
56
+ ],
57
+ "review_id": null
58
+ }
test_database/{car_1/car_1.json → bakery_1/bakery_1.json} RENAMED
@@ -2,215 +2,125 @@
2
  {
3
  "col_data": [
4
  {
5
- "column_name": "ContId",
6
  "data_type": "INTEGER",
7
- "default_column_name": "ContId",
8
  "default_value": null,
9
  "not_null": 0,
10
  "primary_key": 1
11
  },
12
  {
13
- "column_name": "Continent",
14
  "data_type": "TEXT",
15
- "default_column_name": "Continent",
16
  "default_value": null,
17
  "not_null": 0,
18
  "primary_key": 0
19
- }
20
- ],
21
- "table": "continents"
22
- },
23
- {
24
- "col_data": [
25
- {
26
- "column_name": "CountryId",
27
- "data_type": "INTEGER",
28
- "default_column_name": "CountryId",
29
- "default_value": null,
30
- "not_null": 0,
31
- "primary_key": 1
32
  },
33
  {
34
- "column_name": "CountryName",
35
  "data_type": "TEXT",
36
- "default_column_name": "CountryName",
37
- "default_value": null,
38
- "not_null": 0,
39
- "primary_key": 0
40
- },
41
- {
42
- "column_name": "Continent",
43
- "data_type": "INTEGER",
44
- "default_column_name": "Continent",
45
  "default_value": null,
46
  "not_null": 0,
47
  "primary_key": 0
48
  }
49
  ],
50
- "table": "countries"
51
  },
52
  {
53
  "col_data": [
54
  {
55
- "column_name": "Id",
56
- "data_type": "INTEGER",
57
  "default_column_name": "Id",
58
  "default_value": null,
59
  "not_null": 0,
60
  "primary_key": 1
61
  },
62
  {
63
- "column_name": "Maker",
64
  "data_type": "TEXT",
65
- "default_column_name": "Maker",
66
  "default_value": null,
67
  "not_null": 0,
68
  "primary_key": 0
69
  },
70
  {
71
- "column_name": "FullName",
72
  "data_type": "TEXT",
73
- "default_column_name": "FullName",
74
  "default_value": null,
75
  "not_null": 0,
76
  "primary_key": 0
77
  },
78
  {
79
- "column_name": "Country",
80
- "data_type": "TEXT",
81
- "default_column_name": "Country",
82
- "default_value": null,
83
- "not_null": 0,
84
- "primary_key": 0
85
- }
86
- ],
87
- "table": "car-makers"
88
- },
89
- {
90
- "col_data": [
91
- {
92
- "column_name": "MakeId",
93
- "data_type": "INTEGER",
94
- "default_column_name": "MakeId",
95
- "default_value": null,
96
- "not_null": 0,
97
- "primary_key": 1
98
- },
99
- {
100
- "column_name": "Model",
101
- "data_type": "TEXT",
102
- "default_column_name": "Model",
103
- "default_value": null,
104
- "not_null": 0,
105
- "primary_key": 0
106
- },
107
- {
108
- "column_name": "Make",
109
- "data_type": "TEXT",
110
- "default_column_name": "Make",
111
  "default_value": null,
112
  "not_null": 0,
113
  "primary_key": 0
114
  }
115
  ],
116
- "table": "car-names"
117
  },
118
  {
119
  "col_data": [
120
  {
121
- "column_name": "Id",
122
  "data_type": "INTEGER",
123
- "default_column_name": "Id",
124
  "default_value": null,
125
  "not_null": 0,
126
  "primary_key": 1
127
  },
128
  {
129
- "column_name": "MPG",
130
  "data_type": "TEXT",
131
- "default_column_name": "MPG",
132
  "default_value": null,
133
  "not_null": 0,
134
  "primary_key": 0
135
  },
136
  {
137
- "column_name": "Cylinders",
138
  "data_type": "INTEGER",
139
- "default_column_name": "Cylinders",
140
- "default_value": null,
141
- "not_null": 0,
142
- "primary_key": 0
143
- },
144
- {
145
- "column_name": "Edispl",
146
- "data_type": "REAL",
147
- "default_column_name": "Edispl",
148
- "default_value": null,
149
- "not_null": 0,
150
- "primary_key": 0
151
- },
152
- {
153
- "column_name": "Horsepower",
154
- "data_type": "TEXT",
155
- "default_column_name": "Horsepower",
156
- "default_value": null,
157
- "not_null": 0,
158
- "primary_key": 0
159
- },
160
- {
161
- "column_name": "Weight",
162
- "data_type": "INTEGER",
163
- "default_column_name": "Weight",
164
- "default_value": null,
165
- "not_null": 0,
166
- "primary_key": 0
167
- },
168
- {
169
- "column_name": "Accelerate",
170
- "data_type": "REAL",
171
- "default_column_name": "Accelerate",
172
- "default_value": null,
173
- "not_null": 0,
174
- "primary_key": 0
175
- },
176
- {
177
- "column_name": "Year",
178
- "data_type": "INTEGER",
179
- "default_column_name": "Year",
180
  "default_value": null,
181
  "not_null": 0,
182
  "primary_key": 0
183
  }
184
  ],
185
- "table": "cars-data"
186
  },
187
  {
188
  "col_data": [
189
  {
190
- "column_name": "ModelId",
191
  "data_type": "INTEGER",
192
- "default_column_name": "ModelId",
193
  "default_value": null,
194
  "not_null": 0,
195
  "primary_key": 1
196
  },
197
  {
198
- "column_name": "Maker",
199
  "data_type": "INTEGER",
200
- "default_column_name": "Maker",
201
  "default_value": null,
202
  "not_null": 0,
203
- "primary_key": 0
204
  },
205
  {
206
- "column_name": "Model",
207
  "data_type": "TEXT",
208
- "default_column_name": "Model",
209
  "default_value": null,
210
  "not_null": 0,
211
  "primary_key": 0
212
  }
213
  ],
214
- "table": "model-list"
215
  }
216
- ]
 
2
  {
3
  "col_data": [
4
  {
5
+ "column_name": "id",
6
  "data_type": "INTEGER",
7
+ "default_column_name": "Id",
8
  "default_value": null,
9
  "not_null": 0,
10
  "primary_key": 1
11
  },
12
  {
13
+ "column_name": "last_name",
14
  "data_type": "TEXT",
15
+ "default_column_name": "LastName",
16
  "default_value": null,
17
  "not_null": 0,
18
  "primary_key": 0
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  },
20
  {
21
+ "column_name": "first_name",
22
  "data_type": "TEXT",
23
+ "default_column_name": "FirstName",
 
 
 
 
 
 
 
 
24
  "default_value": null,
25
  "not_null": 0,
26
  "primary_key": 0
27
  }
28
  ],
29
+ "table": "customers"
30
  },
31
  {
32
  "col_data": [
33
  {
34
+ "column_name": "id",
35
+ "data_type": "TEXT",
36
  "default_column_name": "Id",
37
  "default_value": null,
38
  "not_null": 0,
39
  "primary_key": 1
40
  },
41
  {
42
+ "column_name": "flavor",
43
  "data_type": "TEXT",
44
+ "default_column_name": "Flavor",
45
  "default_value": null,
46
  "not_null": 0,
47
  "primary_key": 0
48
  },
49
  {
50
+ "column_name": "food",
51
  "data_type": "TEXT",
52
+ "default_column_name": "Food",
53
  "default_value": null,
54
  "not_null": 0,
55
  "primary_key": 0
56
  },
57
  {
58
+ "column_name": "price",
59
+ "data_type": "REAL",
60
+ "default_column_name": "Price",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  "default_value": null,
62
  "not_null": 0,
63
  "primary_key": 0
64
  }
65
  ],
66
+ "table": "goods"
67
  },
68
  {
69
  "col_data": [
70
  {
71
+ "column_name": "reciept_number",
72
  "data_type": "INTEGER",
73
+ "default_column_name": "RecieptNumber",
74
  "default_value": null,
75
  "not_null": 0,
76
  "primary_key": 1
77
  },
78
  {
79
+ "column_name": "date",
80
  "data_type": "TEXT",
81
+ "default_column_name": "Date",
82
  "default_value": null,
83
  "not_null": 0,
84
  "primary_key": 0
85
  },
86
  {
87
+ "column_name": "customer_id",
88
  "data_type": "INTEGER",
89
+ "default_column_name": "CustomerId",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  "default_value": null,
91
  "not_null": 0,
92
  "primary_key": 0
93
  }
94
  ],
95
+ "table": "receipts"
96
  },
97
  {
98
  "col_data": [
99
  {
100
+ "column_name": "reciept",
101
  "data_type": "INTEGER",
102
+ "default_column_name": "Reciept",
103
  "default_value": null,
104
  "not_null": 0,
105
  "primary_key": 1
106
  },
107
  {
108
+ "column_name": "ordinal",
109
  "data_type": "INTEGER",
110
+ "default_column_name": "Ordinal",
111
  "default_value": null,
112
  "not_null": 0,
113
+ "primary_key": 2
114
  },
115
  {
116
+ "column_name": "item",
117
  "data_type": "TEXT",
118
+ "default_column_name": "Item",
119
  "default_value": null,
120
  "not_null": 0,
121
  "primary_key": 0
122
  }
123
  ],
124
+ "table": "items"
125
  }
126
+ ]
test_database/bakery_1/bakery_1.sql ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CREATE TABLE "customers" (
2
+ "Id" INTEGER PRIMARY KEY,
3
+ "LastName" TEXT,
4
+ "FirstName" TEXT
5
+ );
6
+
7
+
8
+ CREATE TABLE "goods" (
9
+ "Id" TEXT PRIMARY KEY,
10
+ "Flavor" TEXT,
11
+ "Food" TEXT,
12
+ "Price" REAL
13
+ );
14
+
15
+
16
+ CREATE TABLE "items" (
17
+ "Receipt" INTEGER,
18
+ "Ordinal" INTEGER,
19
+ "Item" TEXT,
20
+ PRIMARY KEY(Receipt, Ordinal),
21
+ FOREIGN KEY (Item) REFERENCES goods(Id)
22
+ FOREIGN KEY (Receipt) REFERENCES receipts(ReceiptNumber)
23
+ );
24
+
25
+ CREATE TABLE "receipts" (
26
+ "ReceiptNumber" INTEGER PRIMARY KEY,
27
+ "Date" TEXT,
28
+ "CustomerId" INTEGER,
29
+ FOREIGN KEY(CustomerId) REFERENCES customers(Id)
30
+ );
test_database/{geo/geo.sqlite → bakery_1/bakery_1.sqlite} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:becb9fc6faf0d87b2b396100d962ed6d9de0fd4e5e03ad102bacec73529ffbc8
3
  size 57344
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ab55eb34c0ea8cbe29f9651ec3deae620ba8558e03b0e7740daa871e4eba025
3
  size 57344
test_database/bakery_1/bakery_1_michi.txt ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Total # = 51
2
+
3
+ 1. What is the most expensive cake and its flavor?
4
+
5
+ select id, flavor
6
+ from goods
7
+ where food = "Cake"
8
+ order by price desc
9
+ limit 1
10
+
11
+ What is the cheapest cookie and its flavor?
12
+
13
+ select id, flavor
14
+ from goods
15
+ where food = "Cookie"
16
+ order by price
17
+ limit 1
18
+
19
+ 2. Find the ids of goods that have apple flavor.
20
+
21
+ Select id
22
+ From goods
23
+ Where flavor = "Apple"
24
+
25
+ What are the ids of goods that cost less than 3 dollars?
26
+
27
+ Select id
28
+ From goods
29
+ Where price < 3
30
+
31
+
32
+ 3. List the distinct ids of all customers who bought a lemon cake?
33
+
34
+ Select DISTINCT T3.CustomerId
35
+ From goods as T1 JOIN items as T2 JOIN receipts as T3 ON T1.Id = T2.Item and T2.Receipt = T3.ReceiptNumber
36
+ Where T1.Flavor = "Lemon" and T1.Food = "Cake"
37
+
38
+
39
+ For each type of food, tell me how many customers have ever bought it.
40
+
41
+ Select T1.food, count(distinct T3.CustomerId)
42
+ From goods as T1 JOIN items as T2 JOIN receipts as T3 ON T1.Id = T2.Item and T2.Receipt = T3.ReceiptNumber
43
+ Group by T1.food
44
+
45
+
46
+ 4. Find the id of customers who shopped at the bakery at least 15 times.
47
+
48
+ Select CustomerId
49
+ From receipts
50
+ Group by CustomerId
51
+ having count(*) >= 15
52
+
53
+ What is the last name of the customers who shopped at the bakery more than 10 times?
54
+
55
+ Select T2.LastName
56
+ From receipts as T1 JOIN customers as T2 ON T1.CustomerId = T2.id
57
+ Group by T2.id
58
+ having count(*) > 10
59
+
60
+
61
+ 5. How many types of Cake does this bakery sell?
62
+
63
+ Select count(*)
64
+ From goods
65
+ where food = "Cake"
66
+
67
+ List all the flavors of Croissant available in this bakery.
68
+
69
+ Select flavor
70
+ From goods
71
+ where food = "Croissant"
72
+
73
+
74
+ 6. Give me a list of all the distinct items bought by the customer number 15.
75
+
76
+ Select distinct T1.item
77
+ from items as T1 JOIN receipts as T2 ON T1.receipt = T2.ReceiptNumber
78
+ Where T2.CustomerId = 15
79
+
80
+
81
+ For each type of food, what are the average, maximum and minimum price?
82
+
83
+ Select food, avg(price), max(price), min(price)
84
+ from goods
85
+ Group by food
86
+
87
+
88
+ 7. Find the receipt numbers where both Cake and Cookie were bought.
89
+
90
+ Select T1.receipt
91
+ From items as T1 JOIN goods as T2 ON T1.item = T2.id
92
+ Where T2.food = "Cake"
93
+ INTERSECT
94
+ Select T1.receipt
95
+ From items as T1 JOIN goods as T2 ON T1.item = T2.id
96
+ Where T2.food = "Cookie"
97
+
98
+
99
+ Find all the receipt numbers in which customer id 5 purchased Croissant.
100
+
101
+ Select ReceiptNumber
102
+ From receipts
103
+ Where CustomerId = 5
104
+ INTERSECT
105
+ Select T1.receipt
106
+ From items as T1 JOIN goods as T2 ON T1.item = T2.id
107
+ Where T2.food = "Croissant"
108
+
109
+
110
+ 8. What is the receipt number and date of the receipt in which the most expensive item was bought?
111
+
112
+ Select T1.ReceiptNumber, T1.Date
113
+ From receipts as T1 JOIN items as T2 JOIN goods as T3 ON T1.ReceiptNumber = T2.receipt and T2.item = T3.id
114
+ Order by T3.price Desc
115
+ LIMIT 1
116
+
117
+
118
+ What is the item that was bought the least number of times?
119
+ Select item
120
+ From items
121
+ Group by item
122
+ Order by count(*)
123
+ LIMIT 1
124
+
125
+
126
+ 9. How many goods are available for each food type?
127
+
128
+ Select count(*), food
129
+ From goods
130
+ group by food
131
+
132
+ What is the average price for each food type?
133
+
134
+ Select avg(price), food
135
+ From goods
136
+ group by food
137
+
138
+
139
+ 10. What are the goods that have Apricot flavor and are cheaper than 5 dollars?
140
+
141
+ Select id
142
+ From goods
143
+ where flavor = "Apricot" and price < 5
144
+
145
+ Find flavor of cakes that cost more than 10 dollars.
146
+
147
+ Select flavor
148
+ From goods
149
+ where food = "Cake" and price > 10
150
+
151
+
152
+ 11. Give me the distinct id and price for all goods whose price is below the average of all goods?
153
+
154
+ Select distinct id, price
155
+ From goods
156
+ where price < (Select avg(price) From goods)
157
+
158
+
159
+ What are the distinct ids of all goods that are cheaper than some goods of type Tart?
160
+
161
+ Select distinct T1.id
162
+ From goods as T1, goods as T2
163
+ where T1.price < T2.price and T2.food = "Tart"
164
+
165
+
166
+ 12. List distinct receipt numbers for which someone bought a good that costs more than 13 dollars.
167
+
168
+ Select distinct T1.ReceiptNumber
169
+ from receipts as T1 JOIN items as T2 JOIN goods as T3 ON T1.ReceiptNumber = T2.receipt and T2.item = T3.id
170
+ Where T3.price > 13
171
+
172
+
173
+ On which date did some customer buy a good that costs more than 15 dollars?
174
+
175
+ Select distinct T1.date
176
+ from receipts as T1 JOIN items as T2 JOIN goods as T3 ON T1.ReceiptNumber = T2.receipt and T2.item = T3.id
177
+ Where T3.price > 15
178
+
179
+
180
+ 13. Give me the list of all goods whose id has "APP".
181
+
182
+ Select id
183
+ from goods
184
+ Where id LIKE "%APP%"
185
+
186
+ Which good has "70" in its id? And what is its price?
187
+
188
+ Select id, price
189
+ from goods
190
+ Where id LIKE "%70%"
191
+
192
+
193
+ 14. List the last names of all customers in an alphabetical oder.
194
+
195
+ Select distinct LastName
196
+ From customers
197
+ Order by LastName
198
+
199
+ Return the ordered list of all good ids.
200
+
201
+ Select distinct id
202
+ From goods
203
+ Order by id
204
+
205
+
206
+ 15. Find all receipts in which either apple flavor pie was bought or customer id 12 shopped.
207
+
208
+ Select T1.receipt
209
+ From items as T1 JOIN goods as T2 ON T1.item = T2.id
210
+ where T2.flavor = "Apple" and T2.food = "Pie"
211
+ UNION
212
+ Select ReceiptNumber
213
+ From receipts
214
+ where CustomerId = 12
215
+
216
+
217
+ Find all receipts which has the latest date. Also tell me that date.
218
+
219
+ Select ReceiptNumber, date
220
+ From receipts
221
+ where date = (Select date From receipts Order by date Desc LIMIT 1)
222
+
223
+
224
+ Find all receipts which either has the earliest date or has a good with price above 10.
225
+
226
+ Select T1.Receipt
227
+ From items as T1 JOIN goods as T2 ON T1.item = T2.id
228
+ where T2.price > 10
229
+ UNION
230
+ Select ReceiptNumber
231
+ From receipts
232
+ where date = (Select date From receipts Order by date LIMIT 1)
233
+
234
+
235
+ 16. What are the ids of Cookie and Cake that cost between 3 and 7 dollars.
236
+
237
+ Select id
238
+ From goods
239
+ where (food = "Cookie" or food = "Cake") and price between 3 and 7
240
+
241
+
242
+ Find the first name and last name of a customer who visited on the earliest date.
243
+
244
+ Select T1.FirstName, T1.LastName
245
+ From customers as T1 JOIN receipts as T2 ON T1.id = T2.CustomerId
246
+ Order by T2.date
247
+ LIMIT 1
248
+
249
+
250
+
251
+ 17. What is average price of goods whose flavor is blackberry or blueberry?
252
+
253
+ Select avg(price)
254
+ From goods
255
+ where flavor = "Blackberry" or flavor = "Blueberry"
256
+
257
+
258
+ Return the cheapest price for goods with cheese flavor.
259
+
260
+ Select min(price)
261
+ From goods
262
+ where flavor = "Cheese"
263
+
264
+
265
+ 18. What are highest, lowest, and average prices of goods, grouped and ordered by flavor?
266
+
267
+ Select max(price), min(price), avg(price), flavor
268
+ From goods
269
+ group by flavor
270
+ order by flavor
271
+
272
+
273
+ Return the lowest and highest prices of goods grouped and ordered by food type.
274
+
275
+ Select min(price), max(price), food
276
+ From goods
277
+ group by food
278
+ order by food
279
+
280
+
281
+ 19. Find the top three dates when the most goods were sold.
282
+
283
+ Select date
284
+ From receipts
285
+ Group by date
286
+ Order by count(*)
287
+ LIMIT 3
288
+
289
+ Which customer shopped most often? How many times?
290
+
291
+ Select CustomerId, count(*)
292
+ From receipts
293
+ Group by CustomerId
294
+ Order by count(*)
295
+ LIMIT 1
296
+
297
+
298
+ 20. For each date, return how many distinct customers visited on that day.
299
+
300
+ Select date, count (distinct CustomerId)
301
+ from receipts
302
+ Group by date
303
+
304
+
305
+ Give me the first name and last name of customers who have bought apple flavor Tart.
306
+
307
+ Select distinct T4.FirstName, T4.LastName
308
+ from goods as T1 JOIN items as T2 JOIN receipts as T3 JOIN customers as T4 ON T1.id = T2.item and T2.receipt = T3.ReceiptNumber and T3.CustomerId = T4.id
309
+ where T1.flavor = "Apple" and T1.food = "Tart"
310
+
311
+
312
+ 21. What are the ids of Cookies whose price is lower than any Croissant?
313
+
314
+ Select id
315
+ From goods
316
+ where food = "Cookie" and price < (select min(price)
317
+ from goods
318
+ where food = 'Croissant')
319
+
320
+
321
+ Give me the ids of Cakes whose price is at least three times as much as the average price of Tart?
322
+
323
+ Select id
324
+ From goods
325
+ where food = "Cake" and price >= 3 * (select avg(price)
326
+ from goods
327
+ where food = "Tart")
328
+
329
+
330
+ What are the ids of goods whose price is above twice the average price of all goods?
331
+
332
+ Select id
333
+ From goods
334
+ where price > 2 * (select avg(price)
335
+ from goods)
336
+
337
+
338
+ 22. List the id, flavor and type of food of goods ordered by price.
339
+
340
+ Select id, flavor, food
341
+ From goods
342
+ order by price
343
+
344
+
345
+ Return a list of the id and flavor for Cakes ordered by flavor.
346
+
347
+ Select id, flavor
348
+ From goods
349
+ where food = "Cake"
350
+ order by flavor
351
+
352
+
353
+
354
+ 23. Find all the items that have chocolate flavor but were not bought more than 10 times.
355
+
356
+ Select distinct T1.item
357
+ From items as T1 JOIN goods as T2 ON T1.item = T2.id
358
+ Where T2.flavor = "Chocolate"
359
+ EXCEPT
360
+ Select distinct item
361
+ From items
362
+ Group by item
363
+ having count(*) > 10
364
+
365
+
366
+ What are the flavors available for Cake but not for Tart?
367
+
368
+ Select distinct flavor
369
+ From goods
370
+ where food = "Cake"
371
+ EXCEPT
372
+ Select distinct flavor
373
+ From goods
374
+ where food = "Tart"
375
+
376
+
377
+ 24. What is the three most popular goods in this bakery?
378
+
379
+ Select item
380
+ From items
381
+ Group by item
382
+ Order by count (*) DESC
383
+ LIMIT 3
384
+
385
+
386
+
387
+ 25. Find the ids of customers who have spent more than 150 dollars in total.
388
+
389
+ Select T3.CustomerId
390
+ From goods as T1 JOIN items as T2 JOIN receipts as T3 ON T1.id = T2.item and T2.receipt = T3.ReceiptNumber
391
+ Group by T3.CustomerId
392
+ having sum(T1.price) > 150
393
+
394
+
395
+ Find the ids of customers whose average spending for each good is above 5.
396
+
397
+ Select T3.CustomerId
398
+ From goods as T1 JOIN items as T2 JOIN receipts as T3 ON T1.id = T2.item and T2.receipt = T3.ReceiptNumber
399
+ Group by T3.CustomerId
400
+ having avg(T1.price) > 5
401
+
402
+
403
+
404
+ On which day did the bakery sell more than 100 dollars in total.
405
+
406
+ Select T3.date
407
+ From goods as T1 JOIN items as T2 JOIN receipts as T3 ON T1.id = T2.item and T2.receipt = T3.ReceiptNumber
408
+ Group by T3.date
409
+ having sum(T1.price) > 100
410
+
411
+
test_database/bakery_1/data_csv/README.BAKERY.TXT ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *****************************************************
2
+ CPE 365 Alex Dekhtyar
3
+ Cal Poly Computer Science Department
4
+ San Luis Obispo College of Engineering
5
+ California dekhtyar@csc.calpoly.edu
6
+ *****************************************************
7
+ BAKERY DATASET
8
+ Version 1.0
9
+ October 1, 2007
10
+ *****************************************************
11
+ Sources: this is a synthesized dataset.
12
+
13
+ ******************************************************
14
+
15
+ This file describes the contents of the BAKERY dataset
16
+ developed for the CPE 365, Introduction to Databases,
17
+ course at Cal Poly.
18
+
19
+ The dataset contains information about one month worth
20
+ of sales information for a small bakery shop. The sales
21
+ are made to known customers. The dataset contains
22
+ information about the customers, the assortments of
23
+ baked goods offered for sale and the purchases made.
24
+
25
+
26
+ General Conventions.
27
+
28
+ 1. All files in the dataset are CSV (comma-separated values) files.
29
+ 2. First line of each file provides the names of
30
+ columns. Second line may be empty, or may contain
31
+ the first row of the data.
32
+ 3. All string values are enclosed in single quotes (')
33
+
34
+
35
+ The dataset consists of the following files:
36
+
37
+ - customers.csv : information about the bakery's customers
38
+ - goods.csv : information about the baked goods offered
39
+ for sale by the bakery
40
+ - items.csv : itemized reciept infromation for purchases
41
+ - reciepts.csv : general reciept information for purchases
42
+
43
+
44
+ reciepts.csv stores information about individual reciepts
45
+ (purchases by customers). Each purchase may contain from
46
+ one two five items, regardless of whether any items
47
+ purchased are of the same kind (e.g., two "chocolate cakes"
48
+ will be billed as two separate items on the reciept).
49
+ items.csv contains itemized reciept information.
50
+
51
+
52
+ Individual files have the following formats.
53
+
54
+ **************************************************************************
55
+
56
+ customers.csv
57
+
58
+ Id: unique identifier of the customer
59
+ LastName: last name of the customer
60
+ FirstName: first name of the customer
61
+
62
+
63
+
64
+ **************************************************************************
65
+
66
+
67
+ goods.csv
68
+
69
+ Id : unique identifier of the baked good
70
+ Flavor: flavor/type of the good (e.g., "chocolate", "lemon")
71
+ Food: category of the good (e.g., "cake", "tart")
72
+ Price: price (in dollars)
73
+
74
+
75
+
76
+ **************************************************************************
77
+
78
+ items.csv
79
+
80
+ Reciept : reciept number (see reciepts.RecieptNumber)
81
+ Ordinal : position of the purchased item on the
82
+ reciepts. (i.e., first purchased item,
83
+ second purchased item, etc...)
84
+ Item : identifier of the item purchased (see goods.Id)
85
+
86
+
87
+
88
+ **************************************************************************
89
+
90
+ reciepts.csv
91
+
92
+ RecieptNumber : unique identifier of the reciept
93
+ Date : date of the purchase. The date is
94
+ in DD-Mon-YYY format, which is the
95
+ default Oracle's format for DATE data type.
96
+ CustomerId : id of the customer (see customers.Id)
97
+
98
+
99
+ **************************************************************************
100
+ **************************************************************************
101
+
102
+ Permission granted to use and distribute this dataset in its current form,
103
+ provided this file is kept unchanged and is distributed together with the
104
+ data.
105
+
106
+ Permission granted to modify and expand this dataset, provided this
107
+ file is updated accordingly with new information.
108
+
109
+ **************************************************************************
110
+ **************************************************************************
test_database/{car_1/data_csv/car-makers.csv → bakery_1/data_csv/customers.csv} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e799cefbae504a6d2f616c99e64017b5124e37e98eadc41a8cedc4b3a6f98506
3
- size 588
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fa3ff7fe166ed5532eaa19938c5be357335fe82dad84ad5825a2562dba2668b
3
+ size 490
test_database/{car_1/data_csv/continents.csv → bakery_1/data_csv/customers_t.csv} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:20735553edaaa41856e3413ffc22de9026649db723928a72a8e896a0143b311d
3
- size 80
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:873596b8573f92372c6354f62d348d8150bf186a9b9b163801a663ed754c2110
3
+ size 368
test_database/{car_1/data_csv/model-list.csv → bakery_1/data_csv/goods.csv} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5362df5563333aa282c8ca9f6ddbf24c5b9b2799305f6711e7c0cd342fa5694f
3
- size 569
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0676f451bf024fde17687d84c56196bc266bca69713bddf6577711df986d43ae
3
+ size 1411
test_database/bakery_1/data_csv/goods_t.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f330742d8a5e312ba1d5a84d06a44f4eb9d05cc5c5eccedf824bb9674766dac4
3
+ size 1171
test_database/{car_1/car_1.sqlite → bakery_1/data_csv/items (3:11:18, 5:53 PM)_original.csv} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9d851e396e02997a1de073ae982fe1e4b1769fdffce2fac6e325857a3a938709
3
- size 65536
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20b755b8d33b14fb87e922c6869f9fe51cf85811b991de41d674850a4571b1e6
3
+ size 11817
test_database/{aircraft/aircraft.sqlite → bakery_1/data_csv/items.csv} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2b92973e99d8348a324e318fd4d62645ebe428e7346b51277e78385d1ad3b1ef
3
- size 45056
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90323310375d4d72b3a7e97d503afb78a1674c6944474195c8d48504301dbc26
3
+ size 11817
test_database/bakery_1/data_csv/items_t.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a692759e583e70eec78dd4e8947f15b6d8046c5df3c7d31893e5e88c840dce6c
3
+ size 9030
test_database/bakery_1/data_csv/receipts (3:11:18, 5:53 PM)_original.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eee2a10433b03b832649c0d41ef467efc0bb430afcec10452cfa73255971d377
3
+ size 4883
test_database/bakery_1/data_csv/receipts.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c83039e0c6e4271862d128f474051ba500f97ca15edcfce88e82b9f47dff32b6
3
+ size 4883
test_database/bakery_1/data_csv/receipts_t.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16f643a31ccce616a3c94620278de4c7119b60dc64ffc644cd0a1fe2bb3aa873
3
+ size 4081
test_database/{car_1 → bakery_1}/link.txt RENAMED
File without changes
test_database/bakery_1/q.txt ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Find all chocolate-flavored items on the menu whose price is under $5.00. For each item output the flavor, the name (food type) of the item, and the price.
2
+
3
+ Report the prices of any lemon-flavored items. Output the flavor, the name (food type) and the price of each pastry.
4
+
5
+ Find all customers who made a purchase on October 3, 2007. Report the name of the customer (first, last).
6
+
7
+ Find all types of cookies purchased by KIP ARNN during the month of October of 2007. Report each cookie type (flavor, food type) exactly once.
8
+
9
+ Report the total amount of money NATACHA STENZ spent at the bakery during the month of October, 2007.
10
+
11
+ Find all customers who purchased, during the same trip to the bakery, two different Croissants. Report first and last names of the customers.
12
+
13
+ Find the total amount of money the bakery earned in October 2007 from selling eclairs. Report just the amount.
14
+
15
+ Report all days on which more than ten tarts were purchased.
16
+
17
+ For each purchase made by NATACHA STENZ output the receipt number, the date of purchase, the total number of items purchased and the amount paid.
18
+
19
+ Find the customer(s) who spent the most on pastries in October of 2007. Report first and last name.
20
+
21
+ Find the type of baked good (food type, flavor) responsible for highest total revenue.
22
+
23
+ Find the day of the highest revenue in the month of October, 2007.
24
+
25
+ Find the best-selling item (by number of purchases) on the day of the highest revenue in October of 2007.
test_database/bike_1/schema.sql DELETED
The diff for this file is too large to render. See raw diff
 
test_database/{cinema/cinema.sqlite → bike_racing/bike_racing.sqlite} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9fbcc850e33d813a792417291ddfb1cebc4a31716621284ed28ef53df360a14e
3
  size 28672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d485e48c937b87f80c4e2bcc588d88042b1f52b8596b1f47afa33da674c8a5d
3
  size 28672
test_database/bike_racing/schema.sql ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys=ON;
2
+ BEGIN TRANSACTION;
3
+ CREATE TABLE IF NOT EXISTS "bike" (
4
+ "id" int,
5
+ "product_name" text,
6
+ "weight" int,
7
+ "price" real,
8
+ "material" text,
9
+ primary key("id")
10
+ );
11
+ INSERT INTO bike VALUES(1,'BIANCHI SPECIALISSIMA',780,9998.9999999999999999,'Carbon CC');
12
+ INSERT INTO bike VALUES(2,'CANNONDALE SUPERSIX EVO HI-MOD DURA ACE',850,5329.9999999999999999,'carbon fiber');
13
+ INSERT INTO bike VALUES(3,'CANYON AEROAD CF SLX 8.0 DI2',880,3049.9999999999999999,'Toray T700 and T800 carbon fiber');
14
+ INSERT INTO bike VALUES(4,'GIANT TCR ADVANCED SL 0',750,9000.0,'Carbon CC');
15
+ INSERT INTO bike VALUES(5,'Ibis',800,3598.9999999999999998,'Carbon CC');
16
+ INSERT INTO bike VALUES(6,'Ibis ||',760,5000, 'carbon fiber');
17
+ CREATE TABLE IF NOT EXISTS "cyclist" (
18
+ "id" int,
19
+ "heat" int,
20
+ "name" text,
21
+ "nation" text,
22
+ "result" real,
23
+ primary key("id")
24
+ );
25
+ INSERT INTO cyclist VALUES(1,4,'Bradley Wiggins','Great Britain','4:16.571');
26
+ INSERT INTO cyclist VALUES(2,3,'Hayden Roulston','New Zealand','4:19.232');
27
+ INSERT INTO cyclist VALUES(3,1,'Steven Burke','Great Britain','4:21.558');
28
+ INSERT INTO cyclist VALUES(4,2,'Alexei Markov','Russia','4:22.308');
29
+ INSERT INTO cyclist VALUES(5,1,'Volodymyr Dyudya','Ukraine','4:22.471');
30
+ INSERT INTO cyclist VALUES(6,2,'Antonio Tauler','Spain','4:24.974');
31
+ INSERT INTO cyclist VALUES(7,4,'Alexander Serov','Russia','4:25.391');
32
+ INSERT INTO cyclist VALUES(8,3,'Taylor Phinney','United States','4:26.644');
33
+ CREATE TABLE IF NOT EXISTS "cyclists_own_bikes" (
34
+ "cyclist_id" int,
35
+ "bike_id" int,
36
+ "purchase_year" int,
37
+ primary key("cyclist_id", "bike_id"),
38
+ foreign key("cyclist_id") references `cyclist`("id"),
39
+ foreign key("bike_id") references `bike`("id")
40
+ );
41
+ INSERT INTO cyclists_own_bikes VALUES(1,2,2011);
42
+ INSERT INTO cyclists_own_bikes VALUES(1,3,2015);
43
+ INSERT INTO cyclists_own_bikes VALUES(2,3,2017);
44
+ INSERT INTO cyclists_own_bikes VALUES(2,5,2013);
45
+ INSERT INTO cyclists_own_bikes VALUES(2,4,2018);
46
+ INSERT INTO cyclists_own_bikes VALUES(3,4,2017);
47
+ INSERT INTO cyclists_own_bikes VALUES(4,4,2017);
48
+ INSERT INTO cyclists_own_bikes VALUES(5,5,2016);
49
+ INSERT INTO cyclists_own_bikes VALUES(6,5,2016);
50
+ INSERT INTO cyclists_own_bikes VALUES(7,5,2010);
51
+ INSERT INTO cyclists_own_bikes VALUES(7,4,2011);
52
+ INSERT INTO cyclists_own_bikes VALUES(7,2,2012);
53
+ INSERT INTO cyclists_own_bikes VALUES(7,1,2013);
54
+ INSERT INTO cyclists_own_bikes VALUES(7,3,2014);
55
+ COMMIT;
56
+
test_database/bike_racing/schema_old.sql ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys=ON;
2
+ BEGIN TRANSACTION;
3
+ CREATE TABLE IF NOT EXISTS "bike" (
4
+ "id" int,
5
+ "product_name" text,
6
+ "weight" int,
7
+ "price" real,
8
+ "material" text,
9
+ primary key("id")
10
+ );
11
+ INSERT INTO bike VALUES(1,'BIANCHI SPECIALISSIMA',780,9998.9999999999999999,'Carbon CC');
12
+ INSERT INTO bike VALUES(2,'CANNONDALE SUPERSIX EVO HI-MOD DURA ACE',850,5329.9999999999999999,'carbon fiber');
13
+ INSERT INTO bike VALUES(3,'CANYON AEROAD CF SLX 8.0 DI2',880,3049.9999999999999999,'Toray T700 and T800 carbon fiber');
14
+ INSERT INTO bike VALUES(4,'GIANT TCR ADVANCED SL 0',750,9000.0,'Carbon CC');
15
+ INSERT INTO bike VALUES(5,'Ibis',800,3598.9999999999999998,'Carbon CC');
16
+ INSERT INTO bike VALUES(6,'Ibis ||',760,5000, 'carbon fiber');
17
+ CREATE TABLE IF NOT EXISTS "cyclist" (
18
+ "id" int,
19
+ "heat" int,
20
+ "name" text,
21
+ "nation" text,
22
+ "result" real,
23
+ primary key("id")
24
+ );
25
+ INSERT INTO cyclist VALUES(1,4,'Bradley Wiggins','Great Britain','4:16.571');
26
+ INSERT INTO cyclist VALUES(2,3,'Hayden Roulston','New Zealand','4:19.232');
27
+ INSERT INTO cyclist VALUES(3,1,'Steven Burke','Great Britain','4:21.558');
28
+ INSERT INTO cyclist VALUES(4,2,'Alexei Markov','Russia','4:22.308');
29
+ INSERT INTO cyclist VALUES(5,1,'Volodymyr Dyudya','Ukraine','4:22.471');
30
+ INSERT INTO cyclist VALUES(6,2,'Antonio Tauler','Spain','4:24.974');
31
+ INSERT INTO cyclist VALUES(7,4,'Alexander Serov','Russia','4:25.391');
32
+ INSERT INTO cyclist VALUES(8,3,'Taylor Phinney','United States','4:26.644');
33
+ CREATE TABLE IF NOT EXISTS "cyclists_own_bikes" (
34
+ "cyclist_id" int,
35
+ "bike_id" int,
36
+ "purchase_year" int,
37
+ primary key("cyclist_id", "bike_id"),
38
+ foreign key("cyclist_id") references "cyclist"("id"),
39
+ foreign key("bike_id") references "bike"("id")
40
+ );
41
+ INSERT INTO cyclists_own_bikes VALUES(1,2,2011);
42
+ INSERT INTO cyclists_own_bikes VALUES(1,3,2015);
43
+ INSERT INTO cyclists_own_bikes VALUES(2,3,2017);
44
+ INSERT INTO cyclists_own_bikes VALUES(2,5,2013);
45
+ INSERT INTO cyclists_own_bikes VALUES(2,4,2018);
46
+ INSERT INTO cyclists_own_bikes VALUES(3,4,2017);
47
+ INSERT INTO cyclists_own_bikes VALUES(4,4,2017);
48
+ INSERT INTO cyclists_own_bikes VALUES(5,5,2016);
49
+ INSERT INTO cyclists_own_bikes VALUES(6,5,2016);
50
+ INSERT INTO cyclists_own_bikes VALUES(7,5,2010);
51
+ INSERT INTO cyclists_own_bikes VALUES(7,4,2011);
52
+ INSERT INTO cyclists_own_bikes VALUES(7,2,2012);
53
+ INSERT INTO cyclists_own_bikes VALUES(7,1,2013);
54
+ INSERT INTO cyclists_own_bikes VALUES(7,3,2014);
55
+ COMMIT;
56
+
test_database/{company_employee/company_employee.sqlite → book_press/book_press.sqlite} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:86574c9edbecd80ded437d9439d6f81def0973816b1c8af8d007335e62565378
3
  size 28672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8748351b418fb213f3e4871471f8b923011323df6d341fb96796bb36f466acb
3
  size 28672
test_database/book_press/schema.sql ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+ CREATE TABLE "author" (
4
+ "Author_ID" int,
5
+ "Name" text,
6
+ "Age" int,
7
+ "Gender" text,
8
+ PRIMARY KEY ("Author_ID")
9
+ );
10
+
11
+
12
+ INSERT INTO "author" VALUES (1,"Derrick Kosinski",45,"Male");
13
+ INSERT INTO "author" VALUES (2,"Evelyn Smith",32,"Female");
14
+ INSERT INTO "author" VALUES (3,"Johnny Devenanzio",54,"Male");
15
+ INSERT INTO "author" VALUES (4,"Kenny Santucci",21,"Male");
16
+ INSERT INTO "author" VALUES (5,"Jenn Grijalva",19,"Female");
17
+ INSERT INTO "author" VALUES (6,"Paula Meronek",23,"Female");
18
+ INSERT INTO "author" VALUES (7,"Robin Hibbard",52,"Female");
19
+
20
+
21
+ CREATE TABLE "press" (
22
+ "Press_ID" int,
23
+ "Name" text,
24
+ "Month_Profits_billion" real,
25
+ "Year_Profits_billion" real,
26
+ PRIMARY KEY ("Press_ID")
27
+ );
28
+
29
+
30
+ INSERT INTO "press" VALUES (1,"Accor","0.65","6.02");
31
+ INSERT INTO "press" VALUES (2,"Air Liquide","4.08","29.49");
32
+ INSERT INTO "press" VALUES (3,"Alstom","0.96","9.40");
33
+ INSERT INTO "press" VALUES (4,"ArcelorMittal","1.69","15.4");
34
+ INSERT INTO "press" VALUES (5,"STMicroelectronics","0.54","5.25");
35
+ INSERT INTO "press" VALUES (6,"Technip","1.18","9.24");
36
+ INSERT INTO "press" VALUES (7,"Total","11.96","86.94");
37
+ INSERT INTO "press" VALUES (8,"Unibail-Rodamco","2.31","16.80");
38
+ INSERT INTO "press" VALUES (9,"Vallourec","0.58","4.56");
39
+ INSERT INTO "press" VALUES (10,"Veolia Environnement","0.44","5.01");
40
+
41
+
42
+
43
+
44
+ CREATE TABLE "book" (
45
+ "Book_ID" int,
46
+ "Title" text,
47
+ "Book_Series" text,
48
+ "Author_ID" int,
49
+ "Press_ID" int,
50
+ "Sale_Amount" text,
51
+ "Release_date" text,
52
+ PRIMARY KEY ("Book_ID"),
53
+ FOREIGN KEY (`Author_ID`) REFERENCES `author`(`Author_ID`),
54
+ FOREIGN KEY (`Press_ID`) REFERENCES `press`(`Press_ID`)
55
+ );
56
+
57
+ INSERT INTO "book" VALUES (1,"Book Revue","LT",1,1,"1234","2016-01-05");
58
+ INSERT INTO "book" VALUES (2,"Baseball Bugs","LT",2,2,"1214","2016-02-02");
59
+ INSERT INTO "book" VALUES (3,"Holiday for Shoestrings","MM",3,3,"714","2016-02-23");
60
+ INSERT INTO "book" VALUES (4,"Quentin Quail","MM",4,4,"615","2016-03-02");
61
+ INSERT INTO "book" VALUES (5,"Baby Bottleneck","LT",5,5,"1256","2016-03-16");
62
+ INSERT INTO "book" VALUES (6,"Hare Remover","MM",5,4,"1014","2016-03-23");
63
+ INSERT INTO "book" VALUES (7,"Daffy Doodles","MM",1,9,"1307","2016-04-06");
64
+ INSERT INTO "book" VALUES (8,"Hollywood Canine Canteen","MM",1,2,"1114","2016-04-20");
65
+ INSERT INTO "book" VALUES (9,"Hush My Mouse","LT",2,3,"1258","2016-05-04");
66
+ INSERT INTO "book" VALUES (10,"Hair-Raising Hare","MM",5,2,"115","2016-05-25");
67
+
test_database/{candidate_poll/candidate_poll.sqlite → book_review/book_review.sqlite} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7df58984f9d9796538716294ba0dda9f48a4a54907f03a3859285aa4b5cf8dc5
3
  size 20480
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed22389124512c73025037cf2e5546e1225e78a6f5a9db052a3aa635b93fba31
3
  size 20480
test_database/book_review/schema.sql ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+ CREATE TABLE "book" (
4
+ "Book_ID" int,
5
+ "Title" text,
6
+ "Type" text,
7
+ "Pages" int,
8
+ "Chapters" int,
9
+ "Audio" text,
10
+ "Release" text,
11
+ PRIMARY KEY ("Book_ID")
12
+ );
13
+
14
+ CREATE TABLE "review" (
15
+ "Review_ID" int,
16
+ "Book_ID" int,
17
+ "Rating" real,
18
+ "Readers_in_Million" real,
19
+ "Rank" int,
20
+ PRIMARY KEY ("Review_ID"),
21
+ FOREIGN KEY ("Book_ID") REFERENCES `book`("Book_ID")
22
+ );
23
+
24
+ INSERT INTO "book" VALUES (1,"A Game of Thrones","Novel","704","73","33h 53m","August 1996");
25
+ INSERT INTO "book" VALUES (2,"A Clash of Kings","Novel","768","70","37h 17m","February 1999");
26
+ INSERT INTO "book" VALUES (3,"A Storm of Swords","Novel","992","82","47h 37m","November 2000");
27
+ INSERT INTO "book" VALUES (4,"A Feast for Crows","Novel","753","46","31h 10m","November 2005");
28
+ INSERT INTO "book" VALUES (5,"A Dance with Dragons","Poet","1056","73","48h 56m","July 2011");
29
+
30
+ INSERT INTO "review" VALUES (1,1,"6.6","3.3","16");
31
+ INSERT INTO "review" VALUES (2,3,"5.7","2.8","25");
32
+ INSERT INTO "review" VALUES (3,4,"5.8","2.6","26");
33
+ INSERT INTO "review" VALUES (4,5,"5.6","2.4","35");
34
+
test_database/book_review/schema_old.sql ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+ CREATE TABLE "book" (
4
+ "Book_ID" int,
5
+ "Title" text,
6
+ "Type" text,
7
+ "Pages" int,
8
+ "Chapters" int,
9
+ "Audio" text,
10
+ "Release" text,
11
+ PRIMARY KEY ("Book_ID")
12
+ );
13
+
14
+ CREATE TABLE "review" (
15
+ "Review_ID" int,
16
+ "Book_ID" int,
17
+ "Rating" real,
18
+ "Readers_in_Million" real,
19
+ "Rank" int,
20
+ PRIMARY KEY ("Review_ID"),
21
+ FOREIGN KEY ("Book_ID") REFERENCES "book"("Book_ID")
22
+ );
23
+
24
+ INSERT INTO "book" VALUES (1,"A Game of Thrones","Novel","704","73","33h 53m","August 1996");
25
+ INSERT INTO "book" VALUES (2,"A Clash of Kings","Novel","768","70","37h 17m","February 1999");
26
+ INSERT INTO "book" VALUES (3,"A Storm of Swords","Novel","992","82","47h 37m","November 2000");
27
+ INSERT INTO "book" VALUES (4,"A Feast for Crows","Novel","753","46","31h 10m","November 2005");
28
+ INSERT INTO "book" VALUES (5,"A Dance with Dragons","Poet","1056","73","48h 56m","July 2011");
29
+
30
+ INSERT INTO "review" VALUES (1,1,"6.6","3.3","16");
31
+ INSERT INTO "review" VALUES (2,3,"5.7","2.8","25");
32
+ INSERT INTO "review" VALUES (3,4,"5.8","2.6","26");
33
+ INSERT INTO "review" VALUES (4,5,"5.6","2.4","35");
34
+
test_database/browser_web/schema.sql DELETED
@@ -1,58 +0,0 @@
1
- PRAGMA foreign_keys=OFF;
2
- BEGIN TRANSACTION;
3
- CREATE TABLE IF NOT EXISTS "Web_client_accelerator" (
4
- "id" int,
5
- "name" text,
6
- "Operating_system" text,
7
- "Client" text,
8
- "Connection" text,
9
- primary key("id")
10
- );
11
- INSERT INTO Web_client_accelerator VALUES(1,'CACHEbox','Appliance (Linux)','End user, ISP','Broadband, Satellite, Wireless, Fiber, DSL');
12
- INSERT INTO Web_client_accelerator VALUES(2,'CProxy','Windows','user','up to 756kbit/s');
13
- INSERT INTO Web_client_accelerator VALUES(3,'Fasterfox','Windows, Mac, Linux and Mobile devices','user','Dialup, Wireless, Broadband, DSL');
14
- INSERT INTO Web_client_accelerator VALUES(4,'fasTun','Any','All','Any');
15
- INSERT INTO Web_client_accelerator VALUES(5,'Freewire','Windows, except NT and 95','ISP','Dial-up');
16
- INSERT INTO Web_client_accelerator VALUES(6,'Google Web Accelerator (discontinued)','Windows','user/Google server','Broadband');
17
- INSERT INTO Web_client_accelerator VALUES(7,'Heigh Speed','Windows','All','Any');
18
- INSERT INTO Web_client_accelerator VALUES(8,'Netfury','Windows, Mac','End User, ISP','Dial-up, Broadband, DSL, ISDN, Satellite, Wireless');
19
- INSERT INTO Web_client_accelerator VALUES(9,'Nitro','Windows, Mac','End User, ISP','Dial-up, Broadband, DSL, ISDN, Satellite, Wireless');
20
- INSERT INTO Web_client_accelerator VALUES(10,'ONSPEED','Windows, Mac and Mobile devices','user','Dialup, Wireless, Broadband, DSL');
21
- INSERT INTO Web_client_accelerator VALUES(11,'Opera Turbo','Android, Linux, Mac and Windows devices','user/Opera server','Any');
22
- INSERT INTO Web_client_accelerator VALUES(12,'Polipo','Unix (Linux, *BSD, Mac OS X, others), Windows','user/ISP','Any');
23
- INSERT INTO Web_client_accelerator VALUES(13,'Propel','Windows, Mac','End User, ISP','Dial, DSL, ISDN, Satellite, wireless');
24
- INSERT INTO Web_client_accelerator VALUES(14,'Proxyconn Web Accelerator','Windows, Mac, Mobile devices','user','Dialup, Wireless, Broadband, DSL');
25
- INSERT INTO Web_client_accelerator VALUES(15,'RabbIT','Any system with Java 1.6 VM available','ISP','Any');
26
- INSERT INTO Web_client_accelerator VALUES(16,'Squid','Unix (Linux, *BSD, Mac OS X, others), Windows','user/ISP','Any');
27
- INSERT INTO Web_client_accelerator VALUES(17,'Toonel','Windows, Linux, Mac OS, Symbian, WindowsMobile','user/ISP','Any');
28
- INSERT INTO Web_client_accelerator VALUES(18,'WinGate','Windows (2000 onwards)','All','Any');
29
- INSERT INTO Web_client_accelerator VALUES(19,'Ziproxy','Unix (Linux, *BSD, Mac OS X, others)','ISP','Any');
30
- CREATE TABLE IF NOT EXISTS "browser" (
31
- "id" int,
32
- "name" text,
33
- "market_share" real,
34
- primary key("id")
35
- );
36
- INSERT INTO browser VALUES(1,'Internet Explorer',28.960000000000000852);
37
- INSERT INTO browser VALUES(2,'Firefox',18.109999999999999431);
38
- INSERT INTO browser VALUES(3,'Safari',8.5399999999999991473);
39
- INSERT INTO browser VALUES(4,'Opera',1.1999999999999999555);
40
- CREATE TABLE IF NOT EXISTS "accelerator_compatible_browser" (
41
- "accelerator_id" int,
42
- "browser_id" int,
43
- "compatible_since_year" int,
44
- primary key("accelerator_id", "browser_id"),
45
- foreign key ("accelerator_id") references `Web_client_accelerator`("id"),
46
- foreign key ("browser_id") references `browser`("id")
47
- );
48
- INSERT INTO accelerator_compatible_browser VALUES(1,1,1995);
49
- INSERT INTO accelerator_compatible_browser VALUES(1,2,1996);
50
- INSERT INTO accelerator_compatible_browser VALUES(2,3,1996);
51
- INSERT INTO accelerator_compatible_browser VALUES(2,4,2000);
52
- INSERT INTO accelerator_compatible_browser VALUES(3,1,2005);
53
- INSERT INTO accelerator_compatible_browser VALUES(3,2,2007);
54
- INSERT INTO accelerator_compatible_browser VALUES(3,3,2008);
55
- INSERT INTO accelerator_compatible_browser VALUES(4,4,2009);
56
- INSERT INTO accelerator_compatible_browser VALUES(9,1,2010);
57
- COMMIT;
58
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test_database/candidate_poll/schema.sql DELETED
@@ -1,42 +0,0 @@
1
- PRAGMA foreign_keys = ON;
2
-
3
- CREATE TABLE "candidate" (
4
- "Candidate_ID" int,
5
- "People_ID" int,
6
- "Poll_Source" text,
7
- "Date" text,
8
- "Support_rate" real,
9
- "Consider_rate" real,
10
- "Oppose_rate" real,
11
- "Unsure_rate" real,
12
- PRIMARY KEY ("Candidate_ID"),
13
- FOREIGN KEY ("People_ID") REFERENCES "people"("People_ID")
14
- );
15
-
16
- CREATE TABLE "people" (
17
- "People_ID" int,
18
- "Sex" text,
19
- "Name" text,
20
- "Date_of_Birth" text,
21
- "Height" real,
22
- "Weight" real,
23
- PRIMARY KEY ("People_ID")
24
- );
25
-
26
- INSERT INTO "people" VALUES (1,"M","Hubert Henno","06.10.1976","188","83");
27
- INSERT INTO "people" VALUES (2,"M","Dominique Daquin","10.11.1972","197","85");
28
- INSERT INTO "people" VALUES (3,"F","Stéphane Antiga","03.02.1976","200","94");
29
- INSERT INTO "people" VALUES (4,"M","Laurent Capet","05.05.1972","202","92");
30
- INSERT INTO "people" VALUES (5,"F","Frantz Granvorka","10.03.1976","195","90");
31
- INSERT INTO "people" VALUES (6,"M","Vincent Montméat","01.09.1977","196","88");
32
- INSERT INTO "people" VALUES (7,"M","Loïc De Kergret","20.08.1970","193","89");
33
- INSERT INTO "people" VALUES (8,"M","Philippe Barça-Cysique","22.04.1977","194","88");
34
- INSERT INTO "people" VALUES (9,"M","Guillaume Samica","28.09.1981","196","82");
35
-
36
- INSERT INTO "candidate" VALUES (1,1,"WNBC/Marist Poll","Feb 12–15, 2007","0.25","0.30","0.43","0.2");
37
- INSERT INTO "candidate" VALUES (2,3,"WNBC/Marist Poll","Feb 12–15, 2007","0.17","0.42","0.32","0.9");
38
- INSERT INTO "candidate" VALUES (3,4,"FOX News/Opinion Dynamics Poll","Feb 13–14, 2007","0.18","0.34","0.44","0.3");
39
- INSERT INTO "candidate" VALUES (4,6,"Newsweek Poll","Nov 9–10, 2006","0.33","0.20","0.45","0.2");
40
- INSERT INTO "candidate" VALUES (5,7,"Newsweek Poll","Nov 9–10, 2006","0.24","0.30","0.32","0.4");
41
- INSERT INTO "candidate" VALUES (6,9,"Newsweek Poll","Nov 9–10, 2006","0.24","0.27","0.43","0.2");
42
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test_database/car_1/annotation.json DELETED
@@ -1,62 +0,0 @@
1
- {
2
- "label_id": null,
3
- "data": [
4
- {
5
- "nl": "Find all Reanults (\u2019renault\u2019) in the database. For each, report the name and the year.\n",
6
- "id": 0
7
- },
8
- {
9
- "nl": "Find all cars produced by Volvo between 1977 and 1981 (inclusive). Report the name of the car and the year it was produced.\n",
10
- "id": 1
11
- },
12
- {
13
- "nl": "Report all Asian automakers. Output the full name of the automaker and the country of origin\n",
14
- "id": 2
15
- },
16
- {
17
- "nl": "Find all non-four cylinder cars produced in 1980 that have a better fuel economy better than 20 MPG and that accelerate to 60 mph faster than in 15 seconds. Report the name of the car and the name of the automaker.\n",
18
- "id": 3
19
- },
20
- {
21
- "nl": "For each saab released after 1978, compute the ratio between the weight of the car and its number of horsepowers. Report the full name of the car, the year it was produced and the ratio.\n",
22
- "id": 4
23
- },
24
- {
25
- "nl": "Find the average, maximum and minimum horsepower for 4-cylinder vehicles manufactured by renault between 1971 and 1976 inclusively.\n",
26
- "id": 5
27
- },
28
- {
29
- "nl": "Find how many different car manufacturers produced a vehicle heavier than 4000 lbs.\n",
30
- "id": 6
31
- },
32
- {
33
- "nl": "Find the minimum horsepower for 4-cylinder vehicles manufactured by renault between 1971 and 1976 inclusively.\n",
34
- "id": 7
35
- },
36
- {
37
- "nl": "For each year when US-manufactured cars averaged less than 100 horsepowers, report the highest and the lowest engine displacement number.\n",
38
- "id": 8
39
- },
40
- {
41
- "nl": "For each year in which honda produced more than 2 models, report the best, the worst and the average gas milage of a toyota vehicle.\n",
42
- "id": 9
43
- },
44
- {
45
- "nl": "Report all vehicles with the best gas mileage. For each vehicle, report its full name and the year of production.\n",
46
- "id": 10
47
- },
48
- {
49
- "nl": "Among the vehicles with the gas mileage, report the one with the best acceleration. Report full name and the year of production.\n",
50
- "id": 11
51
- },
52
- {
53
- "nl": "For each country report the automaker with the largest number of cars in the database. Report the name of the country.\n",
54
- "id": 12
55
- },
56
- {
57
- "nl": "Find the difference in gas milage between the most fuel-efficient 8-cylinder model and the least fuel-efficient 4-cylinder model. Report just the number.\n",
58
- "id": 13
59
- }
60
- ],
61
- "review_id": null
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test_database/car_1/car_1.sql DELETED
@@ -1,52 +0,0 @@
1
- CREATE TABLE "continents" (
2
- "ContId" INTEGER PRIMARY KEY,
3
- "Continent" TEXT
4
- );
5
-
6
- CREATE TABLE "countries" (
7
- "CountryId" INTEGER PRIMARY KEY,
8
- "CountryName" TEXT,
9
- "Continent" INTEGER,
10
- FOREIGN KEY (Continent) REFERENCES continents(ContId)
11
- );
12
-
13
-
14
- CREATE TABLE "car_makers" (
15
- "Id" INTEGER PRIMARY KEY,
16
- "Maker" TEXT,
17
- "FullName" TEXT,
18
- "Country" TEXT,
19
- FOREIGN KEY (Country) REFERENCES countries(CountryId)
20
- );
21
-
22
-
23
- CREATE TABLE "model_list" (
24
- "ModelId" INTEGER PRIMARY KEY,
25
- "Maker" INTEGER,
26
- "Model" TEXT UNIQUE,
27
- FOREIGN KEY (Maker) REFERENCES car_makers (Id)
28
-
29
- );
30
-
31
-
32
-
33
- CREATE TABLE "car_names" (
34
- "MakeId" INTEGER PRIMARY KEY,
35
- "Model" TEXT,
36
- "Make" TEXT,
37
- FOREIGN KEY (Model) REFERENCES model_list (Model)
38
- );
39
-
40
- CREATE TABLE "cars_data" (
41
- "Id" INTEGER PRIMARY KEY,
42
- "MPG" TEXT,
43
- "Cylinders" INTEGER,
44
- "Edispl" REAL,
45
- "Horsepower" TEXT,
46
- "Weight" INTEGER,
47
- "Accelerate" REAL,
48
- "Year" INTEGER,
49
- FOREIGN KEY (Id) REFERENCES car_names (MakeId)
50
- );
51
-
52
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test_database/car_1/data_csv/README.CARS.TXT DELETED
@@ -1,149 +0,0 @@
1
- *****************************************************
2
- CPE 365 Alex Dekhtyar
3
- Cal Poly Computer Science Department
4
- San Luis Obispo College of Engineering
5
- California dekhtyar@csc.calpoly.edu
6
- *****************************************************
7
- CARS DATASET
8
- Version 1.0
9
- September 26, 2007
10
- *****************************************************
11
- Sources:
12
- The Committee on Statistical Graphics of
13
- the American Statistical Association (ASA)
14
- 1983 Cars dataset
15
- available (among other places) from
16
- CMU's StatLib server:
17
- http://lib.stat.cmu.edu/datasets/
18
-
19
- ******************************************************
20
-
21
-
22
- This file describes the contents of the CARS dataset
23
- developed for the CPE 365, Introduction to Databases
24
- course at Cal Poly.
25
-
26
- The dataset is a normalized and slightly enhanced version
27
- of the ASA's Committee on Statistical Graphics "cars"
28
- dataset offered in 1983 for the visualization competition.
29
- Please refer to the original dataset description
30
- in the file "cars.desc" included with this distribution for
31
- historical purposes. (please, note, cars.desc file does not
32
- describe the format of this dataset correctly).
33
-
34
-
35
- The dataset describes the origins and different parameters
36
- of 406 car models produced in the world between 1970 and 1982.
37
- The dataset consists of the following files:
38
-
39
- General Conventions.
40
-
41
- 1. All files in the dataset are CSV (comma-separated values) files.
42
- 2. First line of each file provides the names of
43
- columns. Second line may be empty, or may contain
44
- the first row of the data
45
- 3. All string values are enclosed in single quotes (')
46
-
47
- - car-makers.csv : information about companies that produce cars
48
- - car-names.csv : information about specific cars (by name)
49
- - cars-data.csv : operational parameters of the cars
50
- - continents.csv : list of continents
51
- - countries.csv : list of countries
52
- - model-list.csv : information about car models produced by car makers
53
-
54
-
55
- The core of the dataset consists of four files: car-makes.csv, model-list.csv,
56
- car-names.csv and cars-data.csv. The first file identifies companies
57
- that produce cars (e.g, "Ford Motor Company", "Toyota"), the second file
58
- lists various models and identified their makes (e.g., "Ford" and "Mercury"
59
- produced by Ford, "Oldsmobile" and "Chevrolet" produced by GM). The third
60
- file is the masterlist of 406 car makes considered in the database
61
- (e.g., "ford torino" or "amc rebel set"). The fourth file contains information
62
- about the operating parameters (see below for a full list) for each make.
63
-
64
-
65
- Individual files have the following formats.
66
-
67
-
68
- **************************************************************************
69
-
70
- car-makers.csv
71
-
72
- Id : unique identifier of the car maker
73
- Maker : short nickname for the car maker
74
- FullName : full name of the car maker
75
- Country : Id of the home country of the maker (see countries.CountryId)
76
-
77
-
78
-
79
- **************************************************************************
80
-
81
- car-names.csv
82
-
83
- MakeId : unique identifier of the car make
84
- Model : unique name of the car model (see model-list.Model)
85
- MakeDescription : description (name) of the car make
86
-
87
-
88
-
89
- **************************************************************************
90
-
91
-
92
- cars-data.csv
93
-
94
- Id : unique identifier of the car make (see car-names.MakeId)
95
- MPG : milage per gallon
96
- Cylinders : number of cylinders
97
- Edispl : engine displacement volume in cubic inches
98
- Horsepower : power of the engine in horsepowers
99
- Weight : weight of the car in lbs
100
- Accelerate : time to accelerate from 0 to 60mph in seconds (possibly
101
- with fractions of a second)
102
- Year : year the car was made
103
-
104
-
105
- NOTE: this file adds the Id attribute to the original cars.data file from
106
- the ASA cars dataset, removes the Origin attribute (the origin is
107
- now dealt with elsewhere), and modifies year to be the actual year
108
- rather than "year - 1900".
109
-
110
-
111
-
112
- **************************************************************************
113
-
114
-
115
- continents.csv
116
-
117
- ContId : unique identifier of the continent
118
- Continent : name of the continent
119
-
120
-
121
- **************************************************************************
122
-
123
- countries.csv
124
-
125
- CountryId : unique identifier of the country
126
- CountryName : name of the country
127
- Continent : unique identifier of the continent the country is on
128
- (see continents.ContId)
129
-
130
-
131
- **************************************************************************
132
-
133
- model-list.csv
134
-
135
- ModelId : unique identifier of the car model
136
- Maker : unique identifier of the car maker (see car-makers.id)
137
- Model : name of the car model (also unique)
138
-
139
-
140
-
141
- **************************************************************************
142
- **************************************************************************
143
-
144
-
145
-
146
-
147
-
148
-
149
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test_database/car_1/data_csv/car-names.csv DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4db9751bbee98a3943c8242dc08cb0ba7b4043e039de72ad2f24578863337bdd
3
- size 13468
 
 
 
 
test_database/car_1/data_csv/cars-data.csv DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:95937d7f6535282015dded5894e7e1fa63f6627a2d9ef2049cee8e9ee7ae644b
3
- size 13071
 
 
 
 
test_database/car_1/data_csv/cars.desc DELETED
@@ -1,94 +0,0 @@
1
- The Committee on Statistical Graphics of the American Statistical
2
- Association (ASA) invites you to participate in its Second (1983)
3
- Exposition of Statistical Graphics Technology. The purposes of the
4
- Exposition are (l) to provide a forum in which users and providers of
5
- statistical graphics technology can exchange information and ideas and
6
- (2) to expose those members of the ASA community who are less familiar
7
- with statistical graphics to its capabilities and potential benefits
8
- to them. The Exposition wil1 be held in conjunction with the Annual
9
- Meetings in Toronto, August 15-18, 1983 and is tentatively scheduled
10
- for the afternoon of Wednesday, August 17.
11
-
12
- Seven providers of statistical graphics technology participated in the
13
- l982 Exposition. By all accounts, the Exposition was well received by
14
- the ASA community and was a worthwhile experience for the
15
- participants. We hope to have those seven involved again this year,
16
- along with as many new participants as we can muster. The 1982
17
- Exposition was summarized in a paper to appear in the Proceeding of
18
- the Statistical Computing Section. A copy of that paper is enclosed
19
- for your information.
20
-
21
- The basic format of the 1983 Exposition will be similar to that of
22
- 1982. However, based upon comments received and experience gained,
23
- there are some changes. The basic structure, intended to be simpler
24
- and more flexible than last year, is as follows:
25
-
26
- A fixed data set is to be analyzed. This data set is a version of the
27
- CRCARS data set of
28
-
29
- Donoho, David and Ramos, Ernesto (1982), ``PRIMDATA:
30
- Data Sets for Use With PRIM-H'' (DRAFT).
31
-
32
- Because of the Committee's limited (zero) budget for the Exposition,
33
- we are forced to provide the data in hardcopy form only (enclosed).
34
- (Sorry!)
35
-
36
- There are 406 observations on the following 8 variables: MPG (miles
37
- per gallon), # cylinders, engine displacement (cu. inches), horsepower,
38
- vehicle weight (lbs.), time to accelerate from O to 60 mph (sec.),
39
- model year (modulo 100), and origin of car (1. American, 2. European,
40
- 3. Japanese). These data appear on seven pages. Also provided are the
41
- car labels (types) in the same order as the 8 variables on seven
42
- separate pages. Missing data values are marked by series of question
43
- marks.
44
-
45
- You are asked to analyze these data using your statistical graphics
46
- software. Your objective should be to achieve graphical displays which
47
- will be meaningful to the viewers and highlight relevant aspects of
48
- the data. If you can best achieve this using simple graphical formats,
49
- fine. If you choose to illustrate some of the more sophisticated
50
- capabilities of your software and can do so without losing relevancy
51
- to the data, that is fine, too. This year, there will be no Committee
52
- commentary on the individual presentations, so you are not competing
53
- with other presenters. The role of each presenter is to do his/her
54
- best job of presenting their statistical graphics technology to the
55
- viewers.
56
-
57
- Each participant will be provided with a 6'(long) by 4'(tall)
58
- posterboard on which to display the results of their analyses. This is
59
- the same format as last year. You are encouraged to remain by your
60
- presentation during the Exposition to answer viewers' questions. Three
61
- copies of your presentation must be submitted to me by July 1. Movie
62
- or slide show presentations cannot be accommodated (sorry). The
63
- Committee will prepare its own poster presentation which will orient
64
- the viewers to the data and the purposes of the Exposition.
65
-
66
- The ASA has asked us to remind all participants that the Exposition is
67
- intended for educational and scientific purposes and is not a
68
- marketing activity. Even though last year's participants did an
69
- excellent job of maintaining that distinction, a cautionary note at
70
- this point is appropriate.
71
-
72
- Those of us who were involved with the 1982 Exposition found it
73
- worthwhile and fun to do. We would very much like to have you
74
- participate this year. For planning purposes, please RSVP (to me, in
75
- writing please) by April 15 as to whether you plan to accept the
76
- Committee's invitation.
77
-
78
- If you have any questions about the Exposition, please call me on
79
- (301/763-5350). If you have specific questions about the data, or the
80
- analysis, please call Karen Kafadar on (301/921-3651). If you cannot
81
- participate but know of another person or group in your organization
82
- who can, please pass this invitation along to them.
83
-
84
- Sincerely,
85
-
86
-
87
-
88
- LAWRENCE H. COX
89
- Statistical Research Division
90
- Bureau of the Census
91
- Room 3524-3
92
- Washington, DC 20233
93
-
94
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test_database/car_1/q.txt DELETED
@@ -1,27 +0,0 @@
1
- Find all Reanults (’renault’) in the database. For each, report the name and the year.
2
-
3
- Find all cars produced by Volvo between 1977 and 1981 (inclusive). Report the name of the car and the year it was produced.
4
-
5
- Report all Asian automakers. Output the full name of the automaker and the country of origin
6
-
7
- Find all non-four cylinder cars produced in 1980 that have a better fuel economy better than 20 MPG and that accelerate to 60 mph faster than in 15 seconds. Report the name of the car and the name of the automaker.
8
-
9
- For each saab released after 1978, compute the ratio between the weight of the car and its number of horsepowers. Report the full name of the car, the year it was produced and the ratio.
10
-
11
- Find the average, maximum and minimum horsepower for 4-cylinder vehicles manufactured by renault between 1971 and 1976 inclusively.
12
-
13
- Find how many different car manufacturers produced a vehicle heavier than 4000 lbs.
14
-
15
- Find the minimum horsepower for 4-cylinder vehicles manufactured by renault between 1971 and 1976 inclusively.
16
-
17
- For each year when US-manufactured cars averaged less than 100 horsepowers, report the highest and the lowest engine displacement number.
18
-
19
- For each year in which honda produced more than 2 models, report the best, the worst and the average gas milage of a toyota vehicle.
20
-
21
- Report all vehicles with the best gas mileage. For each vehicle, report its full name and the year of production.
22
-
23
- Among the vehicles with the gas mileage, report the one with the best acceleration. Report full name and the year of production.
24
-
25
- For each country report the automaker with the largest number of cars in the database. Report the name of the country.
26
-
27
- Find the difference in gas milage between the most fuel-efficient 8-cylinder model and the least fuel-efficient 4-cylinder model. Report just the number.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test_database/cinema/schema.sql DELETED
@@ -1,60 +0,0 @@
1
-
2
- PRAGMA foreign_keys = ON;
3
-
4
-
5
- CREATE TABLE "film" (
6
- "Film_ID" int,
7
- "Rank_in_series" int,
8
- "Number_in_season" int,
9
- "Title" text,
10
- "Directed_by" text,
11
- "Original_air_date" text,
12
- "Production_code" text,
13
- PRIMARY KEY ("Film_ID")
14
- );
15
-
16
- CREATE TABLE "cinema" (
17
- "Cinema_ID" int,
18
- "Name" text,
19
- "Openning_year" int,
20
- "Capacity" int,
21
- "Location" text,
22
- PRIMARY KEY ("Cinema_ID"));
23
-
24
- INSERT INTO "film" VALUES (1,"26","1","The Case of the Mystery Weekend","Bill Schreiner","September 21–25, 1992","50021–50025");
25
- INSERT INTO "film" VALUES (2,"27","2","The Case of the Smart Dummy","Bill Schreiner","September 28–October 2, 1992","50231–50235");
26
- INSERT INTO "film" VALUES (3,"28","3","The Case: Off the Record","Bill Schreiner","October 5–9, 1992","50011–50015");
27
- INSERT INTO "film" VALUES (4,"29","4","The Case of the Bermuda Triangle","Jesus Salvador Treviño","October 12–16, 1992","50251–50255");
28
- INSERT INTO "film" VALUES (5,"30","5","The Case of the Piggy Banker","Bill Schreiner","October 19–23, 1992","50241–50245");
29
-
30
- INSERT INTO "cinema" VALUES (1,"Codling","2010","1100","County Wicklow");
31
- INSERT INTO "cinema" VALUES (2,"Carrowleagh","2012","368","County Cork");
32
- INSERT INTO "cinema" VALUES (3,"Dublin Array","2015","364","County Dublin");
33
- INSERT INTO "cinema" VALUES (4,"Glenmore","2009","305","County Clare");
34
- INSERT INTO "cinema" VALUES (5,"Glenough","2010","325","County Tipperary");
35
- INSERT INTO "cinema" VALUES (6,"Gortahile","2010","208","County Laois");
36
- INSERT INTO "cinema" VALUES (7,"Grouse Lodge","2011","203","County Tipperary");
37
- INSERT INTO "cinema" VALUES (8,"Moneypoint","2011","225","County Clare");
38
- INSERT INTO "cinema" VALUES (9,"Mount Callan","2011","908","County Clare");
39
- INSERT INTO "cinema" VALUES (10,"Oriel","2013","330","County Louth");
40
-
41
- CREATE TABLE "schedule" (
42
- "Cinema_ID" int,
43
- "Film_ID" int,
44
- "Date" text,
45
- "Show_times_per_day" int,
46
- "Price" float,
47
- PRIMARY KEY ("Cinema_ID","Film_ID"),
48
- FOREIGN KEY (`Film_ID`) REFERENCES `film`(`Film_ID`),
49
- FOREIGN KEY (`Cinema_ID`) REFERENCES `cinema`(`Cinema_ID`)
50
- );
51
-
52
-
53
- INSERT INTO "schedule" VALUES (1,1,"21 May",5,12.99);
54
- INSERT INTO "schedule" VALUES (1,2,"21 May",3,12.99);
55
- INSERT INTO "schedule" VALUES (1,3,"21 Jun",2,8.99);
56
- INSERT INTO "schedule" VALUES (2,1,"11 July",5,9.99);
57
- INSERT INTO "schedule" VALUES (6,5,"2 Aug",4,12.99);
58
- INSERT INTO "schedule" VALUES (9,4,"20 May",5,9.99);
59
- INSERT INTO "schedule" VALUES (10,1,"19 May",5,15.99);
60
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test_database/{browser_web/browser_web.sqlite → club_leader/club_leader.sqlite} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ced1ee75f531e02adf66f387ced5997f416653adbcf519c037813aa69599f17a
3
  size 28672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a863548152196d5ab4291c7393bc2fa814f020b0bbd7057a25e9ddaa7ab5e9cb
3
  size 28672
test_database/club_leader/schema.sql ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ PRAGMA foreign_keys = ON;
3
+
4
+ CREATE TABLE "member" (
5
+ "Member_ID" int,
6
+ "Name" text,
7
+ "Nationality" text,
8
+ "Age" int,
9
+ PRIMARY KEY ("Member_ID")
10
+ );
11
+
12
+ CREATE TABLE "club" (
13
+ "Club_ID" int,
14
+ "Overall_Ranking" int,
15
+ "Team_Leader" text,
16
+ "Club_Name" text,
17
+ PRIMARY KEY ("Club_ID")
18
+ );
19
+
20
+ INSERT INTO "member" VALUES ("1984","Wally Lewis","Australia",23);
21
+ INSERT INTO "member" VALUES ("1985","Brett Kenny","Australia",19);
22
+ INSERT INTO "member" VALUES ("1986","Garry Jack","Australia",18);
23
+ INSERT INTO "member" VALUES ("1987","Hugh McGahan Peter Sterling","New Zealand Australia",24);
24
+ INSERT INTO "member" VALUES ("1988","Ellery Hanley","England",19);
25
+ INSERT INTO "member" VALUES ("1989","Mal Meninga","Australia",22);
26
+ INSERT INTO "member" VALUES ("1990","Garry Schofield","England",21);
27
+ INSERT INTO "member" VALUES ("1991","No award given","No award given",20);
28
+ INSERT INTO "member" VALUES ("1999","Andrew Johns","Australia",19);
29
+ INSERT INTO "member" VALUES ("2000","Brad Fittler","Australia",17);
30
+
31
+
32
+ INSERT INTO "club" VALUES ("1","5","Mack Mitchell","Houston");
33
+ INSERT INTO "club" VALUES ("3","57","Oscar Roan","SMU");
34
+ INSERT INTO "club" VALUES ("4","82","Tony Peters","Oklahoma");
35
+ INSERT INTO "club" VALUES ("5","109","John Zimba","Villanova");
36
+ INSERT INTO "club" VALUES ("2","119","Jim Cope","Ohio State");
37
+ INSERT INTO "club" VALUES ("6","150","Charles Miller","West Virginia");
38
+ INSERT INTO "club" VALUES ("16","154","Henry Hynoski","Temple");
39
+ INSERT INTO "club" VALUES ("7","161","Merle Wang","TCU");
40
+ INSERT INTO "club" VALUES ("8","186","Barry Santini","Purdue");
41
+ INSERT INTO "club" VALUES ("9","213","Larry Poole","Kent State");
42
+ INSERT INTO "club" VALUES ("19","215","Floyd Hogan","Arkansas");
43
+ INSERT INTO "club" VALUES ("10","238","Stan Lewis","Wayne");
44
+
45
+
46
+ CREATE TABLE "club_leader" (
47
+ "Club_ID" int,
48
+ "Member_ID" int,
49
+ "Year_Join" text,
50
+ PRIMARY KEY ("Club_ID","Member_ID"),
51
+ FOREIGN KEY ("Club_ID") REFERENCES `club`("Club_ID"),
52
+ FOREIGN KEY ("Member_ID") REFERENCES `member`("Member_ID")
53
+ );
54
+
55
+ INSERT INTO "club_leader" VALUES (1,1988,"2018");
56
+ INSERT INTO "club_leader" VALUES (8,1984,"2017");
57
+ INSERT INTO "club_leader" VALUES (6,1985,"2015");
58
+ INSERT INTO "club_leader" VALUES (4,1990,"2018");
59
+ INSERT INTO "club_leader" VALUES (10,1991,"2017");
60
+ INSERT INTO "club_leader" VALUES (6,1999,"2018");
61
+
test_database/club_leader/schema_old.sql ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ PRAGMA foreign_keys = ON;
3
+
4
+ CREATE TABLE "member" (
5
+ "Member_ID" int,
6
+ "Name" text,
7
+ "Nationality" text,
8
+ "Age" int,
9
+ PRIMARY KEY ("Member_ID")
10
+ );
11
+
12
+ CREATE TABLE "club" (
13
+ "Club_ID" int,
14
+ "Overall_Ranking" int,
15
+ "Team_Leader" text,
16
+ "Club_Name" text,
17
+ PRIMARY KEY ("Club_ID")
18
+ );
19
+
20
+ INSERT INTO "member" VALUES ("1984","Wally Lewis","Australia",23);
21
+ INSERT INTO "member" VALUES ("1985","Brett Kenny","Australia",19);
22
+ INSERT INTO "member" VALUES ("1986","Garry Jack","Australia",18);
23
+ INSERT INTO "member" VALUES ("1987","Hugh McGahan Peter Sterling","New Zealand Australia",24);
24
+ INSERT INTO "member" VALUES ("1988","Ellery Hanley","England",19);
25
+ INSERT INTO "member" VALUES ("1989","Mal Meninga","Australia",22);
26
+ INSERT INTO "member" VALUES ("1990","Garry Schofield","England",21);
27
+ INSERT INTO "member" VALUES ("1991","No award given","No award given",20);
28
+ INSERT INTO "member" VALUES ("1999","Andrew Johns","Australia",19);
29
+ INSERT INTO "member" VALUES ("2000","Brad Fittler","Australia",17);
30
+
31
+
32
+ INSERT INTO "club" VALUES ("1","5","Mack Mitchell","Houston");
33
+ INSERT INTO "club" VALUES ("3","57","Oscar Roan","SMU");
34
+ INSERT INTO "club" VALUES ("4","82","Tony Peters","Oklahoma");
35
+ INSERT INTO "club" VALUES ("5","109","John Zimba","Villanova");
36
+ INSERT INTO "club" VALUES ("2","119","Jim Cope","Ohio State");
37
+ INSERT INTO "club" VALUES ("6","150","Charles Miller","West Virginia");
38
+ INSERT INTO "club" VALUES ("16","154","Henry Hynoski","Temple");
39
+ INSERT INTO "club" VALUES ("7","161","Merle Wang","TCU");
40
+ INSERT INTO "club" VALUES ("8","186","Barry Santini","Purdue");
41
+ INSERT INTO "club" VALUES ("9","213","Larry Poole","Kent State");
42
+ INSERT INTO "club" VALUES ("19","215","Floyd Hogan","Arkansas");
43
+ INSERT INTO "club" VALUES ("10","238","Stan Lewis","Wayne");
44
+
45
+
46
+ CREATE TABLE "club_leader" (
47
+ "Club_ID" int,
48
+ "Member_ID" int,
49
+ "Year_Join" text,
50
+ PRIMARY KEY ("Club_ID","Member_ID"),
51
+ FOREIGN KEY ("Club_ID") REFERENCES "club"("Club_ID"),
52
+ FOREIGN KEY ("Member_ID") REFERENCES "member"("Member_ID")
53
+ );
54
+
55
+ INSERT INTO "club_leader" VALUES (1,1988,"2018");
56
+ INSERT INTO "club_leader" VALUES (8,1984,"2017");
57
+ INSERT INTO "club_leader" VALUES (6,1985,"2015");
58
+ INSERT INTO "club_leader" VALUES (4,1990,"2018");
59
+ INSERT INTO "club_leader" VALUES (10,1991,"2017");
60
+ INSERT INTO "club_leader" VALUES (6,1999,"2018");
61
+
test_database/college_2/TextBookExampleSchema.sql DELETED
The diff for this file is too large to render. See raw diff
 
test_database/college_2/college_2.sqlite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:cb729920ad0b7f06d38a12f6f678307964acc7d3417af83d98c519c65c90d386
3
- size 2117632