Comments (4)
toStartOfInterval(ts - toIntervalMinute(1), toIntervalMinute(5)) + toIntervalMinute(5) AS ts,
????
from clickhouse.
Sorry, that is just a business requirement but I've updated the fiddle and the issue description to simplify that part so that its easier to understand. Thank you
from clickhouse.
You pass rounded ts instead of real ts https://fiddle.clickhouse.com/dee2c899-3d01-48d2-9005-f06424985a40
argMaxState(price, toDateTime(ts)) AS price
VS
argMaxState(price, five_ts) AS price
Also may be you need to use
price AggregateFunction(argMax, FLOAT, DateTime64(9))
argMaxState(price, ts) AS price
https://fiddle.clickhouse.com/d0f33aa9-daf0-4b15-82bd-f1f0566d2295
from clickhouse.
Very helpful tips @den-crane, thanks alot!
from clickhouse.
Related Issues (20)
- Freebsd + Mysql compiling error
- Logs are sent over network not instantly. HOT 1
- ClickHouse Zookeeper API automatically optimize `multi` to `mutiRead` HOT 4
- Create BigRedButton script to cancel all the worflows with a given name HOT 2
- CH to Teradata via ODBC
- Issues with persistency in storage `File`/`S3`/… with setting `engine_file_allow_create_multiple_files`
- ThreadSanitizer: data race: DB::TimeoutSetter::~TimeoutSetter() HOT 2
- Segmentation fault DB::StorageDistributed::getOptimizedQueryProcessingStageAnalyzer
- Add settings `local_filesystem_write_method` HOT 1
- Orc logger is incorrect.
- Support new prefetches in `MergeTreeReadPoolParallelReplicas*`
- AST Fuzzer triggered stack overflow for 02896_cyclic_aliases_crash HOT 1
- ClickHouse MySQL protocol does not work with Golang MySQL driver HOT 5
- `Sparse` serialization should be supported for `Nullable` HOT 1
- TSan/MSan builds failures HOT 8
- Got 'TOO LARGE SIZE' when select from odbc table. Is there new settings for this? HOT 4
- the hdfs with kerberos authentication,I has done follow the doc https://clickhouse.com/docs/en/engines/table-engines/integrations/hdfs, get Exception: Unable to connect to hdfs: simple authentication is not enabled. Available:[TOKEN,KERBEROS](NETWORK_ERROR)
- recursive CTE primary key optimization for recursive step HOT 1
- To select a json object from mongodb in clickhouse. HOT 2
- Getting cannot read all data having too many marks in file. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clickhouse.