在Impala中找到缺失的日期

发布于 2025-02-09 11:36:53 字数 626 浏览 1 评论 0原文

那天

服用药品
桌子
跟踪一个
桌子,他

一张 受试者没有服药。 例如,对于上述情况,我的输出应为

CharlieMedicion_date
09-11-2018CHARLIE
09-12-2018CHARLIE
09-14-2018

Oracle SQL中,可以通过创建一个日历表来完成,并将其丢弃以找出它来找出它缺失的日期。但是,我不确定如何在Impala中往复。

I have a table which tracks a person and the day he took medicines

SubjectMedicine_Date
Charlie09-09-2018
Charlie09-10-2018
Charlie09-13-2018
Charlie09-15-2018

I need to find the missing dates in which the subject did not take his medicine.
For example, for the above case my output should be

SubjectMedicine_Date
Charlie09-11-2018
Charlie09-12-2018
Charlie09-14-2018

In oracle SQL it can be done by creating a calendar table and left joining it to figure out the missing dates. However I am not sure how this can be reciprocated in Impala.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文