作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
简单的查询困扰着我。我似乎做错了,但我知道这很简单:
Select username
From hsi.wftransactionlog
where logdate = (Select max(logdate) From hsi.wftransactionlog)
我想返回具有最高日志日期的用户名。
我正在为每个用户名查找 1 行。日期最长的那个。
最佳答案
I am looking for 1 row per username. The one with the max date.
那么你可能想做一个group by
,比如
Select t1.*
From hsi.wftransactionlog t1
join (Select username, max(logdate) as maxlogdate
From hsi.wftransactionlog
group by username) xxx
on t1.username = xxx.username and t1.logdate = xxx.maxlogdate;
关于mysql - 简单的最大功能困扰着我,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42772473/
很难理解 ownerdraw TreeView ,这里是完整的故事: 一个 VS2013 WinForms 应用程序(在 Windows 8.1 上运行,如果重要的话启用了 TrueType ....
我有以下 JSON 数据,其中包含一个 nations 数组。数据 JSON 文件中的 Neighbouring 指示哪些国家与其他国家有邻居。国家的id指的是邻国的id。 即。俄罗斯与乌克兰相邻,波
有两个表,一个 Contact 表和一个 RelationshipHistory 表。 联系人可以具有多种类型的关系(业务、个人、志愿者等),这意味着随着时间的推移,他们可以在Relationship
我是一名优秀的程序员,十分优秀!