Hacker News new | past | comments | ask | show | jobs | submit login
Unlock Complex Time Series Analysis in SQL with Range Queries (greptime.com)
34 points by DennisZ_89 9 months ago | hide | past | favorite | 8 comments



Half of this article is the author not knowing SQL. Aggregating by day or week is trivial (and doesn't require subqueries) in any database. It goes on to say "Range queries, a single data point may be aggregated into multiple groups" -- standard SQL window functions meet this criteria too.

I think the only thing somewhat novel here is interpolating for missing values.


I doubt it is novel. For example, ClickHouse has the WITH FILL modifier for ORDER BY: https://clickhouse.com/docs/en/sql-reference/statements/sele...


Thanks for your reply, I don‘t mean that the original SQL cannot do this kind of query, but using standard SQL to do such a query will be very complicated and inconsistent with user intuition.

What we have done is to provide an extended syntax of SQL so that users can more intuitively describe the query logic of aggregation based on time series data. But always open to discussions and feedback :)


We don‘t mean that the original SQL cannot do this kind of query, but using standard SQL to do such a query will be very complicated and inconsistent with user intuition.

What we have done is to provide an extended syntax of SQL so that users can more intuitively describe the query logic of aggregation base on time series data.


QuestDB had a recent similar but probably clearer blog post about time-series specific SQL queries: https://questdb.io/blog/olap-vs-time-series-databases-the-sq...


To me, this just reinforces the feel that SQL is a wrong tool for data science, i.e. it is much easier and robust to do it outside of a DB.


Or you want a mix?

I believe the recent surge in SQL usage comes from BigQuery and Athena and the likes.

The main benefit of them is that they help you with distributing the workload over sometimes hundreds of CPUs. And you don't really have to think about it. And you are not restricted fitting all your data into your RAM memory.

But sure, if you want to do a linear regression, it may be a bit clunky. But maybe you used SQL to retrieve the subset of the data you wanted?

I am rather certain of one thing though. If I wanted to do it in SQL i would not use a proprietary keyword but construct it from SQL primitives.


Yes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: