admin管理员组文章数量:1334178
I have 15+ years of temperature data with a resolution of 10 minutes. I would like to create a matrix plot of showing average temperature by month and hour of the day. I already have an hourly aggregation. How can I filter all data for e.g. November and 00h? I can use absolute timestamp in the WHERE clause. However, I need something like a regular expression or alike on formatted timestamp output to filter for the months and hours. I can download the data to Python and process it there, however I would like to do as much as possible on the database level.
Other SQL-dialects like TSQL (MSSQL) have something like MONTH(ts) = 11
which I can use in the WHERE clause or I can use for grouping. So my starting point in TSQL would be
SELECT 100*MONTH(ts)+HOUR(ts), AVG(temp)
FROM timeseries
GROUP BY 100*MONTH(ts)+HOUR(ts)
Any help/hint is greatly appreciated.
本文标签: apache iotdbHow to filter for custom date partStack Overflow
版权声明:本文标题:apache iotdb - How to filter for custom date part? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742364310a2460976.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论