I am using this code: (from this question: How to get the last record per group in SQLHow 你的当前访问异常,请进行认证后继续阅读剩余内容。 提交