如何检查特定列的21天值是否相同,如果为true,则设置标志? [英] How can i check if the value is the same for 21 days for a particular column and if this is true then set a flag ?

查看:111
本文介绍了如何检查特定列的21天值是否相同,如果为true,则设置标志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个具有计算列的数据集,如果它已经>我想触发警报.值(0.5)持续21天,我该如何实现?

I have a dataset which has a computed column , i would like to trigger a alert if it has been > a value (0.5) for 21 days , how can i achieve that.

我可能会想到的s逻辑是:

Something which i could think about a a s logic is :

推荐答案

萨拉斯,

   您可以使用 滑动窗口.如果您需要一个示例,页面底部也提供了一个类似的示例.您需要更改的只是添加具有指定条件的WHERE子句,更改SlidingWindow(day,21)和HAVING COUNT(*)= 21.

   You could use sliding window for this. If you want an example, there is also a similar example provided at the bottom of the page. All you have to change is add WHERE clause with the condition you specified to it, change SlidingWindow(day, 21) and HAVING COUNT(*) = 21.

如有任何疑问,请告诉我

Please let me know, if you have any questions

--------------------------------------------------- -------------------------------------------------- --------------

---------------------------------------------------------------------------------------------------------------

请点击标记为答案"如果您认为答案有用

Please click "Mark as Answer" if you find the answer useful


这篇关于如何检查特定列的21天值是否相同,如果为true,则设置标志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆