parent
7c5440c4fb
commit
27ae26db90
@ -1,3 +1,3 @@
|
||||
[submodule "paper"]
|
||||
path = paper
|
||||
[submodule "docs/paper"]
|
||||
path = docs/paper
|
||||
url = https://github.com/sunyinqi0508/AQueryPaper
|
||||
|
@ -0,0 +1,22 @@
|
||||
SELECT id1, sum(v1) AS v1 FROM source GROUP BY id1; --0.036 | 0.017 | .274
|
||||
|
||||
SELECT id1, id2, sum(v1) AS v1 FROM source GROUP BY id1, id2; -- 0.063 | 0.013
|
||||
|
||||
SELECT id3, sum(v1) AS v1, avg(v3) AS v3 FROM source GROUP BY id3; -- 2.322 | 0.406 | 2.27
|
||||
|
||||
SELECT id4, avg(v1) AS v1, avg(v2) AS v2, avg(v3) AS v3 FROM source GROUP BY id4; -- 0.159 | 0.022
|
||||
|
||||
SELECT id6, sum(v1) AS v1, sum(v2) AS v2, sum(v3) AS v3 FROM source GROUP BY id6; -- 1.778 | 0.699 | 2.283
|
||||
|
||||
--faster median
|
||||
--SELECT id4, id5, median(v3) AS median_v3, stddev(v3) AS sd_v3 FROM source GROUP BY id4, id5; -- x4
|
||||
|
||||
SELECT id3, max(v1) - min(v2) AS range_v1_v2 FROM source GROUP BY id3; -- 0.857 | 0.467 | 2.236
|
||||
|
||||
-- select top 2 from each grp
|
||||
-- SELECT id6, subvec(v3,0,2) AS v3 FROM source GROUP BY id6 order by v3;
|
||||
|
||||
-- implement corr
|
||||
--SELECT id2, id4, pow(corr(v1, v2), 2) AS r2 FROM source GROUP BY id2, id4;
|
||||
|
||||
SELECT id1, id2, id3, id4, id5, id6, sum(v3) AS v3, count(*) AS cnt FROM source GROUP BY id1, id2, id3, id4, id5, id6; -- 2.669 | 1.232 | 2.221(1.8)
|
@ -0,0 +1,6 @@
|
||||
create table source(id1 int,id2 int,id3 int,id4 int,id5 int,id6 int,v1 int,v2 int,v3 float)
|
||||
|
||||
|
||||
LOAD DATA INFILE "data/h2o/G1_1e7_1e1_0_0_n.csv"
|
||||
INTO TABLE source
|
||||
FIELDS TERMINATED BY ","
|
@ -0,0 +1 @@
|
||||
Subproject commit c8d27fe131e952ca4a30b0de27ff58b28a9990ad
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
Subproject commit 6f49544835a35915e1561a2e6581ee9ac0759381
|
Loading…
Reference in new issue