由条件分组的SQL Max或空值
我希望我的输出看起来像
我需要查看ID,然后将最大创建的日期和最大doughted日期用于该ID。在某些情况下,完成的日期仍然是空的,因此在这种情况下,我只需要查看最大创建的日期即可。我不确定如何解决这个问题,通过我的多种情况来完成一个小组
and i want my output to look like this
I need to look at the ID and then take max created date and max completed date for that ID. There is also some cases where completed date is still empty so in that case i just need to look at the max created date. Im not sure how to tackle this, doing a group by doesnt account for my multiple scenarios
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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