Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

latest updates

  • Loading branch information...
commit 781b5f717fbba661450189c09a281e8db05d8a34 1 parent 455608b
@grahn authored
Showing with 44 additions and 38 deletions.
  1. +2 −2 data/final_vote_count.dat
  2. +30 −32 data/votes.dat
  3. +12 −4 load_data.sql
View
4 data/final_vote_count.dat
@@ -174,7 +174,7 @@
11059|4
11060|8
11061|3
-11062|23
+11062|22
11063|25
11064|9
11065|18
@@ -235,7 +235,7 @@
11120|44
11121|46
11122|2
-11123|22
+11123|21
11124|24
11125|3
11126|0
View
62 data/votes.dat
@@ -5480,29 +5480,28 @@
11061|137848
11061|136638
11061|136891
-11062|136927
-11062|80456
-11062|136858
-11062|76157
-11062|76599
+11062|135904
+11062|80451
+11062|76604
+11062|136922
11062|76154
-11062|136853
+11062|76599
+11062|76061
+11062|136863
+11062|136862
+11062|136858
11062|76163
-11062|136870
-11062|32470
-11062|80451
-11062|79178
-11062|75721
-11062|78015
+11062|80456
11062|113712
+11062|78015
11062|76763
-11062|136863
-11062|136862
-11062|76061
-11062|136922
+11062|32470
+11062|75721
+11062|76157
+11062|79178
11062|20236
-11062|135904
-11062|76604
+11062|136853
+11062|136870
11063|27112
11063|136926
11063|117341
@@ -7152,28 +7151,27 @@
11121|138555
11122|137604
11122|53597
-11123|138399
-11123|110344
-11123|138049
-11123|137838
-11123|138931
-11123|119786
-11123|137835
-11123|136986
11123|137885
-11123|119186
11123|137871
-11123|137863
-11123|96899
+11123|137848
+11123|137835
+11123|137838
11123|137834
-11123|137822
11123|138168
+11123|138931
11123|137841
+11123|96899
11123|137765
+11123|136986
11123|30339
-11123|137848
-11123|62254
+11123|137822
+11123|119186
+11123|119786
+11123|110344
+11123|137863
11123|138050
+11123|138049
+11123|62254
11124|137521
11124|137458
11124|137522
View
16 load_data.sql
@@ -4,6 +4,7 @@ drop table sessions;
drop table votes;
drop table users;
drop table final_vote_count;
+drop table all_votes;
create table sessions (
session_id int primary key,
@@ -23,11 +24,18 @@ name varchar(100)
);
create table final_vote_count (
-session_id int primary key,
+session_id int,
total_votes int
);
-LOAD DATA LOCAL INFILE 'sessions.dat' INTO TABLE sessions FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"';
-LOAD DATA LOCAL INFILE 'votes.dat' INTO TABLE votes FIELDS TERMINATED BY '|' (session_id, user_id);
-LOAD DATA LOCAL INFILE 'users.dat' INTO TABLE users FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"';
+create table all_votes (
+id integer primary key auto_increment,
+session_id int,
+user_id int
+);
+
+LOAD DATA LOCAL INFILE 'sessions.dat' INTO TABLE sessions FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"';
+LOAD DATA LOCAL INFILE 'votes.dat' INTO TABLE votes FIELDS TERMINATED BY '|' (session_id, user_id);
+LOAD DATA LOCAL INFILE 'users.dat' INTO TABLE users FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"';
LOAD DATA LOCAL INFILE 'final_vote_count.dat' INTO TABLE final_vote_count FIELDS TERMINATED BY '|';
+LOAD DATA LOCAL INFILE 'all_votes.dat' INTO TABLE all_votes FIELDS TERMINATED BY '|' (session_id, user_id);
Please sign in to comment.
Something went wrong with that request. Please try again.