diff --git a/README.md b/README.md index 557abaf..04e027b 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,8 @@ $ clickhouse-client --query "INSERT INTO rustdx.factor FORMAT CSVWithNames" < ea SELECT yesterday() AS date, code, - last_value(close), - last_value(factor) + last_value(close) AS close, + last_value(factor) AS factor FROM rustdx.factor GROUP BY code INTO OUTFILE 'factor.csv' diff --git a/rustdx-cmd/Cargo.toml b/rustdx-cmd/Cargo.toml index ac92eec..d3f5c40 100644 --- a/rustdx-cmd/Cargo.toml +++ b/rustdx-cmd/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustdx-cmd" -version = "0.1.4" +version = "0.1.5" edition = "2018" license = "MIT" build = "build.rs" diff --git a/rustdx-cmd/src/io.rs b/rustdx-cmd/src/io.rs index d6a678a..00dd237 100644 --- a/rustdx-cmd/src/io.rs +++ b/rustdx-cmd/src/io.rs @@ -237,8 +237,8 @@ fn clickhouse_factor_csv(table: &str) -> Previous { &format!("SELECT yesterday() AS date, code, - last_value(close), - last_value(factor) + last_value(close) AS close, + last_value(factor) AS factor FROM {0} GROUP BY code INTO OUTFILE 'factor.csv'