在Impala中找到缺失的日期
那天
的 | 服用药品 |
---|---|
桌子 | 的 |
我 | 有 |
跟踪 | 一个 |
桌子,他 | 人 |
一张 受试者没有服药。 例如,对于上述情况,我的输出应为
Charlie | Medicion_date |
---|---|
09-11-2018 | CHARLIE |
09-12-2018 | CHARLIE |
09-14-2018 | 在 |
Oracle SQL中,可以通过创建一个日历表来完成,并将其丢弃以找出它来找出它缺失的日期。但是,我不确定如何在Impala中往复。
I have a table which tracks a person and the day he took medicines
Subject | Medicine_Date |
---|---|
Charlie | 09-09-2018 |
Charlie | 09-10-2018 |
Charlie | 09-13-2018 |
Charlie | 09-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
Subject | Medicine_Date |
---|---|
Charlie | 09-11-2018 |
Charlie | 09-12-2018 |
Charlie | 09-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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论